@memnexus-ai/typescript-sdk 1.42.14 → 1.43.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/index.cjs +135 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +36 -6
- package/dist/index.d.ts +36 -6
- package/dist/index.js +135 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -755,6 +755,8 @@ var TopicsService = class extends BaseService {
|
|
|
755
755
|
* List all topics with pagination
|
|
756
756
|
* @param limit - Maximum number of topics to return
|
|
757
757
|
* @param offset - Number of topics to skip
|
|
758
|
+
* @param sortBy - Field to sort topics by
|
|
759
|
+
* @param order - Sort order
|
|
758
760
|
*/
|
|
759
761
|
async listTopics(options) {
|
|
760
762
|
const request = new Request({
|
|
@@ -794,6 +796,30 @@ var TopicsService = class extends BaseService {
|
|
|
794
796
|
isCursor: false
|
|
795
797
|
});
|
|
796
798
|
}
|
|
799
|
+
if (options?.sortBy !== void 0) {
|
|
800
|
+
request.addQueryParam("sortBy", {
|
|
801
|
+
key: "sortBy",
|
|
802
|
+
value: options.sortBy,
|
|
803
|
+
explode: false,
|
|
804
|
+
encode: true,
|
|
805
|
+
style: "form",
|
|
806
|
+
isLimit: false,
|
|
807
|
+
isOffset: false,
|
|
808
|
+
isCursor: false
|
|
809
|
+
});
|
|
810
|
+
}
|
|
811
|
+
if (options?.order !== void 0) {
|
|
812
|
+
request.addQueryParam("order", {
|
|
813
|
+
key: "order",
|
|
814
|
+
value: options.order,
|
|
815
|
+
explode: false,
|
|
816
|
+
encode: true,
|
|
817
|
+
style: "form",
|
|
818
|
+
isLimit: false,
|
|
819
|
+
isOffset: false,
|
|
820
|
+
isCursor: false
|
|
821
|
+
});
|
|
822
|
+
}
|
|
797
823
|
return this.client.call(request);
|
|
798
824
|
}
|
|
799
825
|
/**
|
|
@@ -1903,6 +1929,8 @@ var MemoriesService = class extends BaseService {
|
|
|
1903
1929
|
* @param limit - Maximum number of memories to return
|
|
1904
1930
|
* @param offset - Number of memories to skip
|
|
1905
1931
|
* @param page - Page number (alternative to offset)
|
|
1932
|
+
* @param sortBy - Field to sort results by
|
|
1933
|
+
* @param order - Sort order
|
|
1906
1934
|
*/
|
|
1907
1935
|
async listMemories(options) {
|
|
1908
1936
|
const request = new Request({
|
|
@@ -1966,6 +1994,30 @@ var MemoriesService = class extends BaseService {
|
|
|
1966
1994
|
isCursor: false
|
|
1967
1995
|
});
|
|
1968
1996
|
}
|
|
1997
|
+
if (options?.sortBy !== void 0) {
|
|
1998
|
+
request.addQueryParam("sortBy", {
|
|
1999
|
+
key: "sortBy",
|
|
2000
|
+
value: options.sortBy,
|
|
2001
|
+
explode: false,
|
|
2002
|
+
encode: true,
|
|
2003
|
+
style: "form",
|
|
2004
|
+
isLimit: false,
|
|
2005
|
+
isOffset: false,
|
|
2006
|
+
isCursor: false
|
|
2007
|
+
});
|
|
2008
|
+
}
|
|
2009
|
+
if (options?.order !== void 0) {
|
|
2010
|
+
request.addQueryParam("order", {
|
|
2011
|
+
key: "order",
|
|
2012
|
+
value: options.order,
|
|
2013
|
+
explode: false,
|
|
2014
|
+
encode: true,
|
|
2015
|
+
style: "form",
|
|
2016
|
+
isLimit: false,
|
|
2017
|
+
isOffset: false,
|
|
2018
|
+
isCursor: false
|
|
2019
|
+
});
|
|
2020
|
+
}
|
|
1969
2021
|
return this.client.call(request);
|
|
1970
2022
|
}
|
|
1971
2023
|
/**
|
|
@@ -2047,6 +2099,8 @@ var MemoriesService = class extends BaseService {
|
|
|
2047
2099
|
* @param ingestionTimeTo - Ingestion time range end (ISO 8601 datetime)
|
|
2048
2100
|
* @param includeExpired - Include expired memories in results
|
|
2049
2101
|
* @param temporalMode - Temporal query mode
|
|
2102
|
+
* @param sortBy - Field to sort results by
|
|
2103
|
+
* @param order - Sort order
|
|
2050
2104
|
*/
|
|
2051
2105
|
async searchMemoriesGet(options) {
|
|
2052
2106
|
const request = new Request({
|
|
@@ -2338,6 +2392,30 @@ var MemoriesService = class extends BaseService {
|
|
|
2338
2392
|
isCursor: false
|
|
2339
2393
|
});
|
|
2340
2394
|
}
|
|
2395
|
+
if (options?.sortBy !== void 0) {
|
|
2396
|
+
request.addQueryParam("sortBy", {
|
|
2397
|
+
key: "sortBy",
|
|
2398
|
+
value: options.sortBy,
|
|
2399
|
+
explode: false,
|
|
2400
|
+
encode: true,
|
|
2401
|
+
style: "form",
|
|
2402
|
+
isLimit: false,
|
|
2403
|
+
isOffset: false,
|
|
2404
|
+
isCursor: false
|
|
2405
|
+
});
|
|
2406
|
+
}
|
|
2407
|
+
if (options?.order !== void 0) {
|
|
2408
|
+
request.addQueryParam("order", {
|
|
2409
|
+
key: "order",
|
|
2410
|
+
value: options.order,
|
|
2411
|
+
explode: false,
|
|
2412
|
+
encode: true,
|
|
2413
|
+
style: "form",
|
|
2414
|
+
isLimit: false,
|
|
2415
|
+
isOffset: false,
|
|
2416
|
+
isCursor: false
|
|
2417
|
+
});
|
|
2418
|
+
}
|
|
2341
2419
|
return this.client.call(request);
|
|
2342
2420
|
}
|
|
2343
2421
|
/**
|
|
@@ -3107,6 +3185,8 @@ var FactsService = class extends BaseService {
|
|
|
3107
3185
|
* List all facts for the authenticated user
|
|
3108
3186
|
* @param limit - Maximum number of facts to return
|
|
3109
3187
|
* @param offset - Number of facts to skip
|
|
3188
|
+
* @param sortBy - Field to sort facts by
|
|
3189
|
+
* @param order - Sort order
|
|
3110
3190
|
*/
|
|
3111
3191
|
async listFacts(options) {
|
|
3112
3192
|
const request = new Request({
|
|
@@ -3146,6 +3226,30 @@ var FactsService = class extends BaseService {
|
|
|
3146
3226
|
isCursor: false
|
|
3147
3227
|
});
|
|
3148
3228
|
}
|
|
3229
|
+
if (options?.sortBy !== void 0) {
|
|
3230
|
+
request.addQueryParam("sortBy", {
|
|
3231
|
+
key: "sortBy",
|
|
3232
|
+
value: options.sortBy,
|
|
3233
|
+
explode: false,
|
|
3234
|
+
encode: true,
|
|
3235
|
+
style: "form",
|
|
3236
|
+
isLimit: false,
|
|
3237
|
+
isOffset: false,
|
|
3238
|
+
isCursor: false
|
|
3239
|
+
});
|
|
3240
|
+
}
|
|
3241
|
+
if (options?.order !== void 0) {
|
|
3242
|
+
request.addQueryParam("order", {
|
|
3243
|
+
key: "order",
|
|
3244
|
+
value: options.order,
|
|
3245
|
+
explode: false,
|
|
3246
|
+
encode: true,
|
|
3247
|
+
style: "form",
|
|
3248
|
+
isLimit: false,
|
|
3249
|
+
isOffset: false,
|
|
3250
|
+
isCursor: false
|
|
3251
|
+
});
|
|
3252
|
+
}
|
|
3149
3253
|
return this.client.call(request);
|
|
3150
3254
|
}
|
|
3151
3255
|
/**
|
|
@@ -3454,6 +3558,8 @@ var ConversationsService = class extends BaseService {
|
|
|
3454
3558
|
* @param limit - Maximum number of conversations to return
|
|
3455
3559
|
* @param offset - Number of conversations to skip
|
|
3456
3560
|
* @param since - Return only conversations created after this timestamp (ISO 8601 format)
|
|
3561
|
+
* @param sortBy - Field to sort conversations by
|
|
3562
|
+
* @param order - Sort order
|
|
3457
3563
|
*/
|
|
3458
3564
|
async listConversations(options) {
|
|
3459
3565
|
const request = new Request({
|
|
@@ -3505,6 +3611,30 @@ var ConversationsService = class extends BaseService {
|
|
|
3505
3611
|
isCursor: false
|
|
3506
3612
|
});
|
|
3507
3613
|
}
|
|
3614
|
+
if (options?.sortBy !== void 0) {
|
|
3615
|
+
request.addQueryParam("sortBy", {
|
|
3616
|
+
key: "sortBy",
|
|
3617
|
+
value: options.sortBy,
|
|
3618
|
+
explode: false,
|
|
3619
|
+
encode: true,
|
|
3620
|
+
style: "form",
|
|
3621
|
+
isLimit: false,
|
|
3622
|
+
isOffset: false,
|
|
3623
|
+
isCursor: false
|
|
3624
|
+
});
|
|
3625
|
+
}
|
|
3626
|
+
if (options?.order !== void 0) {
|
|
3627
|
+
request.addQueryParam("order", {
|
|
3628
|
+
key: "order",
|
|
3629
|
+
value: options.order,
|
|
3630
|
+
explode: false,
|
|
3631
|
+
encode: true,
|
|
3632
|
+
style: "form",
|
|
3633
|
+
isLimit: false,
|
|
3634
|
+
isOffset: false,
|
|
3635
|
+
isCursor: false
|
|
3636
|
+
});
|
|
3637
|
+
}
|
|
3508
3638
|
return this.client.call(request);
|
|
3509
3639
|
}
|
|
3510
3640
|
/**
|
|
@@ -4894,7 +5024,11 @@ var searchRequest = import_zod.z.object({
|
|
|
4894
5024
|
/** Include facts extracted from matched memories (defaults to false for performance) */
|
|
4895
5025
|
includeFacts: import_zod.z.boolean().optional(),
|
|
4896
5026
|
/** Filter entities by type (e.g., PERSON, TECHNOLOGY, PROJECT) */
|
|
4897
|
-
entityTypes: import_zod.z.array(import_zod.z.string().max(50)).max(20).optional()
|
|
5027
|
+
entityTypes: import_zod.z.array(import_zod.z.string().max(50)).max(20).optional(),
|
|
5028
|
+
/** Field to sort results by (defaults to 'relevance' for search, 'createdAt' for list) */
|
|
5029
|
+
sortBy: import_zod.z.enum(["relevance", "createdAt", "updatedAt", "eventTime"]).optional(),
|
|
5030
|
+
/** Sort order: 'asc' or 'desc' (defaults to 'desc' for timestamps, 'desc' for relevance) */
|
|
5031
|
+
order: import_zod.z.enum(["asc", "desc"]).optional()
|
|
4898
5032
|
});
|
|
4899
5033
|
var entity = import_zod.z.object({
|
|
4900
5034
|
/** Entity name */
|