@memnexus-ai/typescript-sdk 1.10.2 → 1.13.6
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 +141 -126
- package/dist/index.d.ts +826 -119
- package/dist/index.js +1006 -357
- package/dist/index.mjs +995 -353
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -4272,169 +4272,42 @@ var createMemoryResponseRequest = z62.lazy(() => {
|
|
|
4272
4272
|
}));
|
|
4273
4273
|
});
|
|
4274
4274
|
|
|
4275
|
-
// src/services/memories/models/search-
|
|
4275
|
+
// src/services/memories/models/search-response.ts
|
|
4276
|
+
import { z as z72 } from "zod";
|
|
4277
|
+
|
|
4278
|
+
// src/services/memories/models/search-result.ts
|
|
4279
|
+
import { z as z67 } from "zod";
|
|
4280
|
+
|
|
4281
|
+
// src/services/memories/models/search-result-memory.ts
|
|
4276
4282
|
import { z as z63 } from "zod";
|
|
4277
|
-
var
|
|
4283
|
+
var searchResultMemory = z63.lazy(() => {
|
|
4278
4284
|
return z63.object({
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
|
|
4283
|
-
offset: z63.number().gte(0).optional(),
|
|
4284
|
-
vectorWeight: z63.number().gte(0).lte(1).optional(),
|
|
4285
|
-
fulltextWeight: z63.number().gte(0).lte(1).optional(),
|
|
4286
|
-
threshold: z63.number().gte(0).lte(1).optional(),
|
|
4287
|
-
explain: z63.boolean().optional(),
|
|
4288
|
-
asOfTime: z63.string().optional(),
|
|
4289
|
-
validAtTime: z63.string().optional(),
|
|
4290
|
-
eventTimeFrom: z63.string().optional(),
|
|
4291
|
-
eventTimeTo: z63.string().optional(),
|
|
4292
|
-
ingestionTimeFrom: z63.string().optional(),
|
|
4293
|
-
ingestionTimeTo: z63.string().optional(),
|
|
4294
|
-
includeExpired: z63.boolean().optional(),
|
|
4295
|
-
temporalMode: z63.string().optional(),
|
|
4285
|
+
id: z63.string(),
|
|
4286
|
+
content: z63.string(),
|
|
4287
|
+
memoryType: z63.string(),
|
|
4288
|
+
context: z63.string().optional(),
|
|
4296
4289
|
topics: z63.array(z63.string()).optional(),
|
|
4297
|
-
|
|
4298
|
-
|
|
4299
|
-
|
|
4300
|
-
|
|
4290
|
+
timestamp: z63.string().optional(),
|
|
4291
|
+
eventTime: z63.string().optional(),
|
|
4292
|
+
validFrom: z63.string().optional(),
|
|
4293
|
+
validTo: z63.string().optional().nullable(),
|
|
4294
|
+
createdAt: z63.string(),
|
|
4295
|
+
updatedAt: z63.string()
|
|
4301
4296
|
});
|
|
4302
4297
|
});
|
|
4303
|
-
var
|
|
4298
|
+
var searchResultMemoryResponse = z63.lazy(() => {
|
|
4304
4299
|
return z63.object({
|
|
4305
|
-
|
|
4306
|
-
|
|
4307
|
-
|
|
4308
|
-
|
|
4309
|
-
offset: z63.number().gte(0).optional(),
|
|
4310
|
-
vectorWeight: z63.number().gte(0).lte(1).optional(),
|
|
4311
|
-
fulltextWeight: z63.number().gte(0).lte(1).optional(),
|
|
4312
|
-
threshold: z63.number().gte(0).lte(1).optional(),
|
|
4313
|
-
explain: z63.boolean().optional(),
|
|
4314
|
-
asOfTime: z63.string().optional(),
|
|
4315
|
-
validAtTime: z63.string().optional(),
|
|
4316
|
-
eventTimeFrom: z63.string().optional(),
|
|
4317
|
-
eventTimeTo: z63.string().optional(),
|
|
4318
|
-
ingestionTimeFrom: z63.string().optional(),
|
|
4319
|
-
ingestionTimeTo: z63.string().optional(),
|
|
4320
|
-
includeExpired: z63.boolean().optional(),
|
|
4321
|
-
temporalMode: z63.string().optional(),
|
|
4300
|
+
id: z63.string(),
|
|
4301
|
+
content: z63.string(),
|
|
4302
|
+
memoryType: z63.string(),
|
|
4303
|
+
context: z63.string().optional(),
|
|
4322
4304
|
topics: z63.array(z63.string()).optional(),
|
|
4323
|
-
|
|
4324
|
-
|
|
4325
|
-
|
|
4326
|
-
|
|
4327
|
-
|
|
4328
|
-
|
|
4329
|
-
mode: data["mode"],
|
|
4330
|
-
searchMethod: data["searchMethod"],
|
|
4331
|
-
limit: data["limit"],
|
|
4332
|
-
offset: data["offset"],
|
|
4333
|
-
vectorWeight: data["vectorWeight"],
|
|
4334
|
-
fulltextWeight: data["fulltextWeight"],
|
|
4335
|
-
threshold: data["threshold"],
|
|
4336
|
-
explain: data["explain"],
|
|
4337
|
-
asOfTime: data["asOfTime"],
|
|
4338
|
-
validAtTime: data["validAtTime"],
|
|
4339
|
-
eventTimeFrom: data["eventTimeFrom"],
|
|
4340
|
-
eventTimeTo: data["eventTimeTo"],
|
|
4341
|
-
ingestionTimeFrom: data["ingestionTimeFrom"],
|
|
4342
|
-
ingestionTimeTo: data["ingestionTimeTo"],
|
|
4343
|
-
includeExpired: data["includeExpired"],
|
|
4344
|
-
temporalMode: data["temporalMode"],
|
|
4345
|
-
topics: data["topics"],
|
|
4346
|
-
memoryType: data["memoryType"],
|
|
4347
|
-
conversationId: data["conversationId"],
|
|
4348
|
-
includeTopics: data["includeTopics"],
|
|
4349
|
-
includeEntities: data["includeEntities"]
|
|
4350
|
-
}));
|
|
4351
|
-
});
|
|
4352
|
-
var searchRequestRequest = z63.lazy(() => {
|
|
4353
|
-
return z63.object({
|
|
4354
|
-
query: z63.string().min(1),
|
|
4355
|
-
mode: z63.string().optional(),
|
|
4356
|
-
searchMethod: z63.string().optional(),
|
|
4357
|
-
limit: z63.number().gte(1).lte(100).optional(),
|
|
4358
|
-
offset: z63.number().gte(0).optional(),
|
|
4359
|
-
vectorWeight: z63.number().gte(0).lte(1).optional(),
|
|
4360
|
-
fulltextWeight: z63.number().gte(0).lte(1).optional(),
|
|
4361
|
-
threshold: z63.number().gte(0).lte(1).optional(),
|
|
4362
|
-
explain: z63.boolean().optional(),
|
|
4363
|
-
asOfTime: z63.string().optional(),
|
|
4364
|
-
validAtTime: z63.string().optional(),
|
|
4365
|
-
eventTimeFrom: z63.string().optional(),
|
|
4366
|
-
eventTimeTo: z63.string().optional(),
|
|
4367
|
-
ingestionTimeFrom: z63.string().optional(),
|
|
4368
|
-
ingestionTimeTo: z63.string().optional(),
|
|
4369
|
-
includeExpired: z63.boolean().optional(),
|
|
4370
|
-
temporalMode: z63.string().optional(),
|
|
4371
|
-
topics: z63.array(z63.string()).optional(),
|
|
4372
|
-
memoryType: z63.string().optional(),
|
|
4373
|
-
conversationId: z63.string().optional(),
|
|
4374
|
-
includeTopics: z63.boolean().optional(),
|
|
4375
|
-
includeEntities: z63.boolean().optional()
|
|
4376
|
-
}).transform((data) => ({
|
|
4377
|
-
query: data["query"],
|
|
4378
|
-
mode: data["mode"],
|
|
4379
|
-
searchMethod: data["searchMethod"],
|
|
4380
|
-
limit: data["limit"],
|
|
4381
|
-
offset: data["offset"],
|
|
4382
|
-
vectorWeight: data["vectorWeight"],
|
|
4383
|
-
fulltextWeight: data["fulltextWeight"],
|
|
4384
|
-
threshold: data["threshold"],
|
|
4385
|
-
explain: data["explain"],
|
|
4386
|
-
asOfTime: data["asOfTime"],
|
|
4387
|
-
validAtTime: data["validAtTime"],
|
|
4388
|
-
eventTimeFrom: data["eventTimeFrom"],
|
|
4389
|
-
eventTimeTo: data["eventTimeTo"],
|
|
4390
|
-
ingestionTimeFrom: data["ingestionTimeFrom"],
|
|
4391
|
-
ingestionTimeTo: data["ingestionTimeTo"],
|
|
4392
|
-
includeExpired: data["includeExpired"],
|
|
4393
|
-
temporalMode: data["temporalMode"],
|
|
4394
|
-
topics: data["topics"],
|
|
4395
|
-
memoryType: data["memoryType"],
|
|
4396
|
-
conversationId: data["conversationId"],
|
|
4397
|
-
includeTopics: data["includeTopics"],
|
|
4398
|
-
includeEntities: data["includeEntities"]
|
|
4399
|
-
}));
|
|
4400
|
-
});
|
|
4401
|
-
|
|
4402
|
-
// src/services/memories/models/search-response.ts
|
|
4403
|
-
import { z as z73 } from "zod";
|
|
4404
|
-
|
|
4405
|
-
// src/services/memories/models/search-result.ts
|
|
4406
|
-
import { z as z68 } from "zod";
|
|
4407
|
-
|
|
4408
|
-
// src/services/memories/models/search-result-memory.ts
|
|
4409
|
-
import { z as z64 } from "zod";
|
|
4410
|
-
var searchResultMemory = z64.lazy(() => {
|
|
4411
|
-
return z64.object({
|
|
4412
|
-
id: z64.string(),
|
|
4413
|
-
content: z64.string(),
|
|
4414
|
-
memoryType: z64.string(),
|
|
4415
|
-
context: z64.string().optional(),
|
|
4416
|
-
topics: z64.array(z64.string()).optional(),
|
|
4417
|
-
timestamp: z64.string().optional(),
|
|
4418
|
-
eventTime: z64.string().optional(),
|
|
4419
|
-
validFrom: z64.string().optional(),
|
|
4420
|
-
validTo: z64.string().optional().nullable(),
|
|
4421
|
-
createdAt: z64.string(),
|
|
4422
|
-
updatedAt: z64.string()
|
|
4423
|
-
});
|
|
4424
|
-
});
|
|
4425
|
-
var searchResultMemoryResponse = z64.lazy(() => {
|
|
4426
|
-
return z64.object({
|
|
4427
|
-
id: z64.string(),
|
|
4428
|
-
content: z64.string(),
|
|
4429
|
-
memoryType: z64.string(),
|
|
4430
|
-
context: z64.string().optional(),
|
|
4431
|
-
topics: z64.array(z64.string()).optional(),
|
|
4432
|
-
timestamp: z64.string().optional(),
|
|
4433
|
-
eventTime: z64.string().optional(),
|
|
4434
|
-
validFrom: z64.string().optional(),
|
|
4435
|
-
validTo: z64.string().optional().nullable(),
|
|
4436
|
-
createdAt: z64.string(),
|
|
4437
|
-
updatedAt: z64.string()
|
|
4305
|
+
timestamp: z63.string().optional(),
|
|
4306
|
+
eventTime: z63.string().optional(),
|
|
4307
|
+
validFrom: z63.string().optional(),
|
|
4308
|
+
validTo: z63.string().optional().nullable(),
|
|
4309
|
+
createdAt: z63.string(),
|
|
4310
|
+
updatedAt: z63.string()
|
|
4438
4311
|
}).transform((data) => ({
|
|
4439
4312
|
id: data["id"],
|
|
4440
4313
|
content: data["content"],
|
|
@@ -4449,19 +4322,19 @@ var searchResultMemoryResponse = z64.lazy(() => {
|
|
|
4449
4322
|
updatedAt: data["updatedAt"]
|
|
4450
4323
|
}));
|
|
4451
4324
|
});
|
|
4452
|
-
var searchResultMemoryRequest =
|
|
4453
|
-
return
|
|
4454
|
-
id:
|
|
4455
|
-
content:
|
|
4456
|
-
memoryType:
|
|
4457
|
-
context:
|
|
4458
|
-
topics:
|
|
4459
|
-
timestamp:
|
|
4460
|
-
eventTime:
|
|
4461
|
-
validFrom:
|
|
4462
|
-
validTo:
|
|
4463
|
-
createdAt:
|
|
4464
|
-
updatedAt:
|
|
4325
|
+
var searchResultMemoryRequest = z63.lazy(() => {
|
|
4326
|
+
return z63.object({
|
|
4327
|
+
id: z63.string(),
|
|
4328
|
+
content: z63.string(),
|
|
4329
|
+
memoryType: z63.string(),
|
|
4330
|
+
context: z63.string().optional(),
|
|
4331
|
+
topics: z63.array(z63.string()).optional(),
|
|
4332
|
+
timestamp: z63.string().optional(),
|
|
4333
|
+
eventTime: z63.string().optional(),
|
|
4334
|
+
validFrom: z63.string().optional(),
|
|
4335
|
+
validTo: z63.string().optional().nullable(),
|
|
4336
|
+
createdAt: z63.string(),
|
|
4337
|
+
updatedAt: z63.string()
|
|
4465
4338
|
}).transform((data) => ({
|
|
4466
4339
|
id: data["id"],
|
|
4467
4340
|
content: data["content"],
|
|
@@ -4478,26 +4351,26 @@ var searchResultMemoryRequest = z64.lazy(() => {
|
|
|
4478
4351
|
});
|
|
4479
4352
|
|
|
4480
4353
|
// src/services/memories/models/entity.ts
|
|
4481
|
-
import { z as
|
|
4482
|
-
var entity =
|
|
4483
|
-
return
|
|
4484
|
-
name:
|
|
4485
|
-
type:
|
|
4354
|
+
import { z as z64 } from "zod";
|
|
4355
|
+
var entity = z64.lazy(() => {
|
|
4356
|
+
return z64.object({
|
|
4357
|
+
name: z64.string().optional(),
|
|
4358
|
+
type: z64.string().optional()
|
|
4486
4359
|
});
|
|
4487
4360
|
});
|
|
4488
|
-
var entityResponse =
|
|
4489
|
-
return
|
|
4490
|
-
name:
|
|
4491
|
-
type:
|
|
4361
|
+
var entityResponse = z64.lazy(() => {
|
|
4362
|
+
return z64.object({
|
|
4363
|
+
name: z64.string().optional(),
|
|
4364
|
+
type: z64.string().optional()
|
|
4492
4365
|
}).transform((data) => ({
|
|
4493
4366
|
name: data["name"],
|
|
4494
4367
|
type: data["type"]
|
|
4495
4368
|
}));
|
|
4496
4369
|
});
|
|
4497
|
-
var entityRequest =
|
|
4498
|
-
return
|
|
4499
|
-
name:
|
|
4500
|
-
type:
|
|
4370
|
+
var entityRequest = z64.lazy(() => {
|
|
4371
|
+
return z64.object({
|
|
4372
|
+
name: z64.string().optional(),
|
|
4373
|
+
type: z64.string().optional()
|
|
4501
4374
|
}).transform((data) => ({
|
|
4502
4375
|
name: data["name"],
|
|
4503
4376
|
type: data["type"]
|
|
@@ -4505,30 +4378,30 @@ var entityRequest = z65.lazy(() => {
|
|
|
4505
4378
|
});
|
|
4506
4379
|
|
|
4507
4380
|
// src/services/memories/models/topic-reference.ts
|
|
4508
|
-
import { z as
|
|
4509
|
-
var topicReference =
|
|
4510
|
-
return
|
|
4511
|
-
id:
|
|
4512
|
-
name:
|
|
4513
|
-
createdAt:
|
|
4381
|
+
import { z as z65 } from "zod";
|
|
4382
|
+
var topicReference = z65.lazy(() => {
|
|
4383
|
+
return z65.object({
|
|
4384
|
+
id: z65.string(),
|
|
4385
|
+
name: z65.string(),
|
|
4386
|
+
createdAt: z65.string().optional()
|
|
4514
4387
|
});
|
|
4515
4388
|
});
|
|
4516
|
-
var topicReferenceResponse =
|
|
4517
|
-
return
|
|
4518
|
-
id:
|
|
4519
|
-
name:
|
|
4520
|
-
createdAt:
|
|
4389
|
+
var topicReferenceResponse = z65.lazy(() => {
|
|
4390
|
+
return z65.object({
|
|
4391
|
+
id: z65.string(),
|
|
4392
|
+
name: z65.string(),
|
|
4393
|
+
createdAt: z65.string().optional()
|
|
4521
4394
|
}).transform((data) => ({
|
|
4522
4395
|
id: data["id"],
|
|
4523
4396
|
name: data["name"],
|
|
4524
4397
|
createdAt: data["createdAt"]
|
|
4525
4398
|
}));
|
|
4526
4399
|
});
|
|
4527
|
-
var topicReferenceRequest =
|
|
4528
|
-
return
|
|
4529
|
-
id:
|
|
4530
|
-
name:
|
|
4531
|
-
createdAt:
|
|
4400
|
+
var topicReferenceRequest = z65.lazy(() => {
|
|
4401
|
+
return z65.object({
|
|
4402
|
+
id: z65.string(),
|
|
4403
|
+
name: z65.string(),
|
|
4404
|
+
createdAt: z65.string().optional()
|
|
4532
4405
|
}).transform((data) => ({
|
|
4533
4406
|
id: data["id"],
|
|
4534
4407
|
name: data["name"],
|
|
@@ -4537,21 +4410,21 @@ var topicReferenceRequest = z66.lazy(() => {
|
|
|
4537
4410
|
});
|
|
4538
4411
|
|
|
4539
4412
|
// src/services/memories/models/explanation.ts
|
|
4540
|
-
import { z as
|
|
4541
|
-
var explanation =
|
|
4542
|
-
return
|
|
4543
|
-
matchReason:
|
|
4544
|
-
matchedTerms:
|
|
4545
|
-
semanticSimilarity:
|
|
4546
|
-
contributingFactors:
|
|
4413
|
+
import { z as z66 } from "zod";
|
|
4414
|
+
var explanation = z66.lazy(() => {
|
|
4415
|
+
return z66.object({
|
|
4416
|
+
matchReason: z66.string(),
|
|
4417
|
+
matchedTerms: z66.array(z66.string()).optional(),
|
|
4418
|
+
semanticSimilarity: z66.number().optional(),
|
|
4419
|
+
contributingFactors: z66.array(z66.string()).optional()
|
|
4547
4420
|
});
|
|
4548
4421
|
});
|
|
4549
|
-
var explanationResponse =
|
|
4550
|
-
return
|
|
4551
|
-
matchReason:
|
|
4552
|
-
matchedTerms:
|
|
4553
|
-
semanticSimilarity:
|
|
4554
|
-
contributingFactors:
|
|
4422
|
+
var explanationResponse = z66.lazy(() => {
|
|
4423
|
+
return z66.object({
|
|
4424
|
+
matchReason: z66.string(),
|
|
4425
|
+
matchedTerms: z66.array(z66.string()).optional(),
|
|
4426
|
+
semanticSimilarity: z66.number().optional(),
|
|
4427
|
+
contributingFactors: z66.array(z66.string()).optional()
|
|
4555
4428
|
}).transform((data) => ({
|
|
4556
4429
|
matchReason: data["matchReason"],
|
|
4557
4430
|
matchedTerms: data["matchedTerms"],
|
|
@@ -4559,12 +4432,12 @@ var explanationResponse = z67.lazy(() => {
|
|
|
4559
4432
|
contributingFactors: data["contributingFactors"]
|
|
4560
4433
|
}));
|
|
4561
4434
|
});
|
|
4562
|
-
var explanationRequest =
|
|
4563
|
-
return
|
|
4564
|
-
matchReason:
|
|
4565
|
-
matchedTerms:
|
|
4566
|
-
semanticSimilarity:
|
|
4567
|
-
contributingFactors:
|
|
4435
|
+
var explanationRequest = z66.lazy(() => {
|
|
4436
|
+
return z66.object({
|
|
4437
|
+
matchReason: z66.string(),
|
|
4438
|
+
matchedTerms: z66.array(z66.string()).optional(),
|
|
4439
|
+
semanticSimilarity: z66.number().optional(),
|
|
4440
|
+
contributingFactors: z66.array(z66.string()).optional()
|
|
4568
4441
|
}).transform((data) => ({
|
|
4569
4442
|
matchReason: data["matchReason"],
|
|
4570
4443
|
matchedTerms: data["matchedTerms"],
|
|
@@ -4574,33 +4447,33 @@ var explanationRequest = z67.lazy(() => {
|
|
|
4574
4447
|
});
|
|
4575
4448
|
|
|
4576
4449
|
// src/services/memories/models/search-result.ts
|
|
4577
|
-
var searchResult =
|
|
4578
|
-
return
|
|
4450
|
+
var searchResult = z67.lazy(() => {
|
|
4451
|
+
return z67.object({
|
|
4579
4452
|
memory: searchResultMemory,
|
|
4580
|
-
score:
|
|
4581
|
-
entities:
|
|
4582
|
-
topics:
|
|
4583
|
-
searchMethod:
|
|
4584
|
-
hybridScore:
|
|
4585
|
-
vectorScore:
|
|
4586
|
-
vectorRank:
|
|
4587
|
-
fulltextScore:
|
|
4588
|
-
fulltextRank:
|
|
4453
|
+
score: z67.number(),
|
|
4454
|
+
entities: z67.array(entity).optional(),
|
|
4455
|
+
topics: z67.array(topicReference).optional(),
|
|
4456
|
+
searchMethod: z67.string().optional(),
|
|
4457
|
+
hybridScore: z67.number().optional(),
|
|
4458
|
+
vectorScore: z67.number().optional(),
|
|
4459
|
+
vectorRank: z67.number().optional().nullable(),
|
|
4460
|
+
fulltextScore: z67.number().optional(),
|
|
4461
|
+
fulltextRank: z67.number().optional().nullable(),
|
|
4589
4462
|
explanation: explanation.optional()
|
|
4590
4463
|
});
|
|
4591
4464
|
});
|
|
4592
|
-
var searchResultResponse =
|
|
4593
|
-
return
|
|
4465
|
+
var searchResultResponse = z67.lazy(() => {
|
|
4466
|
+
return z67.object({
|
|
4594
4467
|
memory: searchResultMemoryResponse,
|
|
4595
|
-
score:
|
|
4596
|
-
entities:
|
|
4597
|
-
topics:
|
|
4598
|
-
searchMethod:
|
|
4599
|
-
hybridScore:
|
|
4600
|
-
vectorScore:
|
|
4601
|
-
vectorRank:
|
|
4602
|
-
fulltextScore:
|
|
4603
|
-
fulltextRank:
|
|
4468
|
+
score: z67.number(),
|
|
4469
|
+
entities: z67.array(entityResponse).optional(),
|
|
4470
|
+
topics: z67.array(topicReferenceResponse).optional(),
|
|
4471
|
+
searchMethod: z67.string().optional(),
|
|
4472
|
+
hybridScore: z67.number().optional(),
|
|
4473
|
+
vectorScore: z67.number().optional(),
|
|
4474
|
+
vectorRank: z67.number().optional().nullable(),
|
|
4475
|
+
fulltextScore: z67.number().optional(),
|
|
4476
|
+
fulltextRank: z67.number().optional().nullable(),
|
|
4604
4477
|
explanation: explanationResponse.optional()
|
|
4605
4478
|
}).transform((data) => ({
|
|
4606
4479
|
memory: data["memory"],
|
|
@@ -4616,18 +4489,18 @@ var searchResultResponse = z68.lazy(() => {
|
|
|
4616
4489
|
explanation: data["explanation"]
|
|
4617
4490
|
}));
|
|
4618
4491
|
});
|
|
4619
|
-
var searchResultRequest =
|
|
4620
|
-
return
|
|
4492
|
+
var searchResultRequest = z67.lazy(() => {
|
|
4493
|
+
return z67.object({
|
|
4621
4494
|
memory: searchResultMemoryRequest,
|
|
4622
|
-
score:
|
|
4623
|
-
entities:
|
|
4624
|
-
topics:
|
|
4625
|
-
searchMethod:
|
|
4626
|
-
hybridScore:
|
|
4627
|
-
vectorScore:
|
|
4628
|
-
vectorRank:
|
|
4629
|
-
fulltextScore:
|
|
4630
|
-
fulltextRank:
|
|
4495
|
+
score: z67.number(),
|
|
4496
|
+
entities: z67.array(entityRequest).optional(),
|
|
4497
|
+
topics: z67.array(topicReferenceRequest).optional(),
|
|
4498
|
+
searchMethod: z67.string().optional(),
|
|
4499
|
+
hybridScore: z67.number().optional(),
|
|
4500
|
+
vectorScore: z67.number().optional(),
|
|
4501
|
+
vectorRank: z67.number().optional().nullable(),
|
|
4502
|
+
fulltextScore: z67.number().optional(),
|
|
4503
|
+
fulltextRank: z67.number().optional().nullable(),
|
|
4631
4504
|
explanation: explanationRequest.optional()
|
|
4632
4505
|
}).transform((data) => ({
|
|
4633
4506
|
memory: data["memory"],
|
|
@@ -4645,30 +4518,30 @@ var searchResultRequest = z68.lazy(() => {
|
|
|
4645
4518
|
});
|
|
4646
4519
|
|
|
4647
4520
|
// src/services/memories/models/search-response-pagination.ts
|
|
4648
|
-
import { z as
|
|
4649
|
-
var searchResponsePagination =
|
|
4650
|
-
return
|
|
4651
|
-
limit:
|
|
4652
|
-
offset:
|
|
4653
|
-
count:
|
|
4521
|
+
import { z as z68 } from "zod";
|
|
4522
|
+
var searchResponsePagination = z68.lazy(() => {
|
|
4523
|
+
return z68.object({
|
|
4524
|
+
limit: z68.number().gte(1),
|
|
4525
|
+
offset: z68.number().gte(0),
|
|
4526
|
+
count: z68.number().gte(0)
|
|
4654
4527
|
});
|
|
4655
4528
|
});
|
|
4656
|
-
var searchResponsePaginationResponse =
|
|
4657
|
-
return
|
|
4658
|
-
limit:
|
|
4659
|
-
offset:
|
|
4660
|
-
count:
|
|
4529
|
+
var searchResponsePaginationResponse = z68.lazy(() => {
|
|
4530
|
+
return z68.object({
|
|
4531
|
+
limit: z68.number().gte(1),
|
|
4532
|
+
offset: z68.number().gte(0),
|
|
4533
|
+
count: z68.number().gte(0)
|
|
4661
4534
|
}).transform((data) => ({
|
|
4662
4535
|
limit: data["limit"],
|
|
4663
4536
|
offset: data["offset"],
|
|
4664
4537
|
count: data["count"]
|
|
4665
4538
|
}));
|
|
4666
4539
|
});
|
|
4667
|
-
var searchResponsePaginationRequest =
|
|
4668
|
-
return
|
|
4669
|
-
limit:
|
|
4670
|
-
offset:
|
|
4671
|
-
count:
|
|
4540
|
+
var searchResponsePaginationRequest = z68.lazy(() => {
|
|
4541
|
+
return z68.object({
|
|
4542
|
+
limit: z68.number().gte(1),
|
|
4543
|
+
offset: z68.number().gte(0),
|
|
4544
|
+
count: z68.number().gte(0)
|
|
4672
4545
|
}).transform((data) => ({
|
|
4673
4546
|
limit: data["limit"],
|
|
4674
4547
|
offset: data["offset"],
|
|
@@ -4677,29 +4550,29 @@ var searchResponsePaginationRequest = z69.lazy(() => {
|
|
|
4677
4550
|
});
|
|
4678
4551
|
|
|
4679
4552
|
// src/services/memories/models/temporal-metadata.ts
|
|
4680
|
-
import { z as
|
|
4553
|
+
import { z as z71 } from "zod";
|
|
4681
4554
|
|
|
4682
4555
|
// src/services/memories/models/event-time-range.ts
|
|
4683
|
-
import { z as
|
|
4684
|
-
var eventTimeRange =
|
|
4685
|
-
return
|
|
4686
|
-
from:
|
|
4687
|
-
to:
|
|
4556
|
+
import { z as z69 } from "zod";
|
|
4557
|
+
var eventTimeRange = z69.lazy(() => {
|
|
4558
|
+
return z69.object({
|
|
4559
|
+
from: z69.string().nullable(),
|
|
4560
|
+
to: z69.string().nullable()
|
|
4688
4561
|
});
|
|
4689
4562
|
});
|
|
4690
|
-
var eventTimeRangeResponse =
|
|
4691
|
-
return
|
|
4692
|
-
from:
|
|
4693
|
-
to:
|
|
4563
|
+
var eventTimeRangeResponse = z69.lazy(() => {
|
|
4564
|
+
return z69.object({
|
|
4565
|
+
from: z69.string().nullable(),
|
|
4566
|
+
to: z69.string().nullable()
|
|
4694
4567
|
}).transform((data) => ({
|
|
4695
4568
|
from: data["from"],
|
|
4696
4569
|
to: data["to"]
|
|
4697
4570
|
}));
|
|
4698
4571
|
});
|
|
4699
|
-
var eventTimeRangeRequest =
|
|
4700
|
-
return
|
|
4701
|
-
from:
|
|
4702
|
-
to:
|
|
4572
|
+
var eventTimeRangeRequest = z69.lazy(() => {
|
|
4573
|
+
return z69.object({
|
|
4574
|
+
from: z69.string().nullable(),
|
|
4575
|
+
to: z69.string().nullable()
|
|
4703
4576
|
}).transform((data) => ({
|
|
4704
4577
|
from: data["from"],
|
|
4705
4578
|
to: data["to"]
|
|
@@ -4707,26 +4580,26 @@ var eventTimeRangeRequest = z70.lazy(() => {
|
|
|
4707
4580
|
});
|
|
4708
4581
|
|
|
4709
4582
|
// src/services/memories/models/ingestion-time-range.ts
|
|
4710
|
-
import { z as
|
|
4711
|
-
var ingestionTimeRange =
|
|
4712
|
-
return
|
|
4713
|
-
from:
|
|
4714
|
-
to:
|
|
4583
|
+
import { z as z70 } from "zod";
|
|
4584
|
+
var ingestionTimeRange = z70.lazy(() => {
|
|
4585
|
+
return z70.object({
|
|
4586
|
+
from: z70.string().nullable(),
|
|
4587
|
+
to: z70.string().nullable()
|
|
4715
4588
|
});
|
|
4716
4589
|
});
|
|
4717
|
-
var ingestionTimeRangeResponse =
|
|
4718
|
-
return
|
|
4719
|
-
from:
|
|
4720
|
-
to:
|
|
4590
|
+
var ingestionTimeRangeResponse = z70.lazy(() => {
|
|
4591
|
+
return z70.object({
|
|
4592
|
+
from: z70.string().nullable(),
|
|
4593
|
+
to: z70.string().nullable()
|
|
4721
4594
|
}).transform((data) => ({
|
|
4722
4595
|
from: data["from"],
|
|
4723
4596
|
to: data["to"]
|
|
4724
4597
|
}));
|
|
4725
4598
|
});
|
|
4726
|
-
var ingestionTimeRangeRequest =
|
|
4727
|
-
return
|
|
4728
|
-
from:
|
|
4729
|
-
to:
|
|
4599
|
+
var ingestionTimeRangeRequest = z70.lazy(() => {
|
|
4600
|
+
return z70.object({
|
|
4601
|
+
from: z70.string().nullable(),
|
|
4602
|
+
to: z70.string().nullable()
|
|
4730
4603
|
}).transform((data) => ({
|
|
4731
4604
|
from: data["from"],
|
|
4732
4605
|
to: data["to"]
|
|
@@ -4734,26 +4607,26 @@ var ingestionTimeRangeRequest = z71.lazy(() => {
|
|
|
4734
4607
|
});
|
|
4735
4608
|
|
|
4736
4609
|
// src/services/memories/models/temporal-metadata.ts
|
|
4737
|
-
var temporalMetadata =
|
|
4738
|
-
return
|
|
4739
|
-
temporalMode:
|
|
4740
|
-
asOfTime:
|
|
4741
|
-
validAtTime:
|
|
4610
|
+
var temporalMetadata = z71.lazy(() => {
|
|
4611
|
+
return z71.object({
|
|
4612
|
+
temporalMode: z71.string(),
|
|
4613
|
+
asOfTime: z71.string().nullable(),
|
|
4614
|
+
validAtTime: z71.string().nullable(),
|
|
4742
4615
|
eventTimeRange: eventTimeRange.nullable(),
|
|
4743
4616
|
ingestionTimeRange: ingestionTimeRange.nullable(),
|
|
4744
|
-
includeExpired:
|
|
4745
|
-
temporalFieldsIncluded:
|
|
4617
|
+
includeExpired: z71.boolean(),
|
|
4618
|
+
temporalFieldsIncluded: z71.boolean()
|
|
4746
4619
|
});
|
|
4747
4620
|
});
|
|
4748
|
-
var temporalMetadataResponse =
|
|
4749
|
-
return
|
|
4750
|
-
temporalMode:
|
|
4751
|
-
asOfTime:
|
|
4752
|
-
validAtTime:
|
|
4621
|
+
var temporalMetadataResponse = z71.lazy(() => {
|
|
4622
|
+
return z71.object({
|
|
4623
|
+
temporalMode: z71.string(),
|
|
4624
|
+
asOfTime: z71.string().nullable(),
|
|
4625
|
+
validAtTime: z71.string().nullable(),
|
|
4753
4626
|
eventTimeRange: eventTimeRangeResponse.nullable(),
|
|
4754
4627
|
ingestionTimeRange: ingestionTimeRangeResponse.nullable(),
|
|
4755
|
-
includeExpired:
|
|
4756
|
-
temporalFieldsIncluded:
|
|
4628
|
+
includeExpired: z71.boolean(),
|
|
4629
|
+
temporalFieldsIncluded: z71.boolean()
|
|
4757
4630
|
}).transform((data) => ({
|
|
4758
4631
|
temporalMode: data["temporalMode"],
|
|
4759
4632
|
asOfTime: data["asOfTime"],
|
|
@@ -4764,15 +4637,15 @@ var temporalMetadataResponse = z72.lazy(() => {
|
|
|
4764
4637
|
temporalFieldsIncluded: data["temporalFieldsIncluded"]
|
|
4765
4638
|
}));
|
|
4766
4639
|
});
|
|
4767
|
-
var temporalMetadataRequest =
|
|
4768
|
-
return
|
|
4769
|
-
temporalMode:
|
|
4770
|
-
asOfTime:
|
|
4771
|
-
validAtTime:
|
|
4640
|
+
var temporalMetadataRequest = z71.lazy(() => {
|
|
4641
|
+
return z71.object({
|
|
4642
|
+
temporalMode: z71.string(),
|
|
4643
|
+
asOfTime: z71.string().nullable(),
|
|
4644
|
+
validAtTime: z71.string().nullable(),
|
|
4772
4645
|
eventTimeRange: eventTimeRangeRequest.nullable(),
|
|
4773
4646
|
ingestionTimeRange: ingestionTimeRangeRequest.nullable(),
|
|
4774
|
-
includeExpired:
|
|
4775
|
-
temporalFieldsIncluded:
|
|
4647
|
+
includeExpired: z71.boolean(),
|
|
4648
|
+
temporalFieldsIncluded: z71.boolean()
|
|
4776
4649
|
}).transform((data) => ({
|
|
4777
4650
|
temporalMode: data["temporalMode"],
|
|
4778
4651
|
asOfTime: data["asOfTime"],
|
|
@@ -4785,18 +4658,18 @@ var temporalMetadataRequest = z72.lazy(() => {
|
|
|
4785
4658
|
});
|
|
4786
4659
|
|
|
4787
4660
|
// src/services/memories/models/search-response.ts
|
|
4788
|
-
var searchResponse =
|
|
4789
|
-
return
|
|
4790
|
-
data:
|
|
4791
|
-
searchMethod:
|
|
4661
|
+
var searchResponse = z72.lazy(() => {
|
|
4662
|
+
return z72.object({
|
|
4663
|
+
data: z72.array(searchResult),
|
|
4664
|
+
searchMethod: z72.string().optional(),
|
|
4792
4665
|
pagination: searchResponsePagination,
|
|
4793
4666
|
temporalMetadata: temporalMetadata.nullable()
|
|
4794
4667
|
});
|
|
4795
4668
|
});
|
|
4796
|
-
var searchResponseResponse =
|
|
4797
|
-
return
|
|
4798
|
-
data:
|
|
4799
|
-
searchMethod:
|
|
4669
|
+
var searchResponseResponse = z72.lazy(() => {
|
|
4670
|
+
return z72.object({
|
|
4671
|
+
data: z72.array(searchResultResponse),
|
|
4672
|
+
searchMethod: z72.string().optional(),
|
|
4800
4673
|
pagination: searchResponsePaginationResponse,
|
|
4801
4674
|
temporalMetadata: temporalMetadataResponse.nullable()
|
|
4802
4675
|
}).transform((data) => ({
|
|
@@ -4806,10 +4679,10 @@ var searchResponseResponse = z73.lazy(() => {
|
|
|
4806
4679
|
temporalMetadata: data["temporalMetadata"]
|
|
4807
4680
|
}));
|
|
4808
4681
|
});
|
|
4809
|
-
var searchResponseRequest =
|
|
4810
|
-
return
|
|
4811
|
-
data:
|
|
4812
|
-
searchMethod:
|
|
4682
|
+
var searchResponseRequest = z72.lazy(() => {
|
|
4683
|
+
return z72.object({
|
|
4684
|
+
data: z72.array(searchResultRequest),
|
|
4685
|
+
searchMethod: z72.string().optional(),
|
|
4813
4686
|
pagination: searchResponsePaginationRequest,
|
|
4814
4687
|
temporalMetadata: temporalMetadataRequest.nullable()
|
|
4815
4688
|
}).transform((data) => ({
|
|
@@ -4820,6 +4693,133 @@ var searchResponseRequest = z73.lazy(() => {
|
|
|
4820
4693
|
}));
|
|
4821
4694
|
});
|
|
4822
4695
|
|
|
4696
|
+
// src/services/memories/models/search-request.ts
|
|
4697
|
+
import { z as z73 } from "zod";
|
|
4698
|
+
var searchRequest = z73.lazy(() => {
|
|
4699
|
+
return z73.object({
|
|
4700
|
+
query: z73.string().min(1),
|
|
4701
|
+
mode: z73.string().optional(),
|
|
4702
|
+
searchMethod: z73.string().optional(),
|
|
4703
|
+
limit: z73.number().gte(1).lte(100).optional(),
|
|
4704
|
+
offset: z73.number().gte(0).optional(),
|
|
4705
|
+
vectorWeight: z73.number().gte(0).lte(1).optional(),
|
|
4706
|
+
fulltextWeight: z73.number().gte(0).lte(1).optional(),
|
|
4707
|
+
threshold: z73.number().gte(0).lte(1).optional(),
|
|
4708
|
+
explain: z73.boolean().optional(),
|
|
4709
|
+
asOfTime: z73.string().optional(),
|
|
4710
|
+
validAtTime: z73.string().optional(),
|
|
4711
|
+
eventTimeFrom: z73.string().optional(),
|
|
4712
|
+
eventTimeTo: z73.string().optional(),
|
|
4713
|
+
ingestionTimeFrom: z73.string().optional(),
|
|
4714
|
+
ingestionTimeTo: z73.string().optional(),
|
|
4715
|
+
includeExpired: z73.boolean().optional(),
|
|
4716
|
+
temporalMode: z73.string().optional(),
|
|
4717
|
+
topics: z73.array(z73.string()).optional(),
|
|
4718
|
+
memoryType: z73.string().optional(),
|
|
4719
|
+
conversationId: z73.string().optional(),
|
|
4720
|
+
includeTopics: z73.boolean().optional(),
|
|
4721
|
+
includeEntities: z73.boolean().optional()
|
|
4722
|
+
});
|
|
4723
|
+
});
|
|
4724
|
+
var searchRequestResponse = z73.lazy(() => {
|
|
4725
|
+
return z73.object({
|
|
4726
|
+
query: z73.string().min(1),
|
|
4727
|
+
mode: z73.string().optional(),
|
|
4728
|
+
searchMethod: z73.string().optional(),
|
|
4729
|
+
limit: z73.number().gte(1).lte(100).optional(),
|
|
4730
|
+
offset: z73.number().gte(0).optional(),
|
|
4731
|
+
vectorWeight: z73.number().gte(0).lte(1).optional(),
|
|
4732
|
+
fulltextWeight: z73.number().gte(0).lte(1).optional(),
|
|
4733
|
+
threshold: z73.number().gte(0).lte(1).optional(),
|
|
4734
|
+
explain: z73.boolean().optional(),
|
|
4735
|
+
asOfTime: z73.string().optional(),
|
|
4736
|
+
validAtTime: z73.string().optional(),
|
|
4737
|
+
eventTimeFrom: z73.string().optional(),
|
|
4738
|
+
eventTimeTo: z73.string().optional(),
|
|
4739
|
+
ingestionTimeFrom: z73.string().optional(),
|
|
4740
|
+
ingestionTimeTo: z73.string().optional(),
|
|
4741
|
+
includeExpired: z73.boolean().optional(),
|
|
4742
|
+
temporalMode: z73.string().optional(),
|
|
4743
|
+
topics: z73.array(z73.string()).optional(),
|
|
4744
|
+
memoryType: z73.string().optional(),
|
|
4745
|
+
conversationId: z73.string().optional(),
|
|
4746
|
+
includeTopics: z73.boolean().optional(),
|
|
4747
|
+
includeEntities: z73.boolean().optional()
|
|
4748
|
+
}).transform((data) => ({
|
|
4749
|
+
query: data["query"],
|
|
4750
|
+
mode: data["mode"],
|
|
4751
|
+
searchMethod: data["searchMethod"],
|
|
4752
|
+
limit: data["limit"],
|
|
4753
|
+
offset: data["offset"],
|
|
4754
|
+
vectorWeight: data["vectorWeight"],
|
|
4755
|
+
fulltextWeight: data["fulltextWeight"],
|
|
4756
|
+
threshold: data["threshold"],
|
|
4757
|
+
explain: data["explain"],
|
|
4758
|
+
asOfTime: data["asOfTime"],
|
|
4759
|
+
validAtTime: data["validAtTime"],
|
|
4760
|
+
eventTimeFrom: data["eventTimeFrom"],
|
|
4761
|
+
eventTimeTo: data["eventTimeTo"],
|
|
4762
|
+
ingestionTimeFrom: data["ingestionTimeFrom"],
|
|
4763
|
+
ingestionTimeTo: data["ingestionTimeTo"],
|
|
4764
|
+
includeExpired: data["includeExpired"],
|
|
4765
|
+
temporalMode: data["temporalMode"],
|
|
4766
|
+
topics: data["topics"],
|
|
4767
|
+
memoryType: data["memoryType"],
|
|
4768
|
+
conversationId: data["conversationId"],
|
|
4769
|
+
includeTopics: data["includeTopics"],
|
|
4770
|
+
includeEntities: data["includeEntities"]
|
|
4771
|
+
}));
|
|
4772
|
+
});
|
|
4773
|
+
var searchRequestRequest = z73.lazy(() => {
|
|
4774
|
+
return z73.object({
|
|
4775
|
+
query: z73.string().min(1),
|
|
4776
|
+
mode: z73.string().optional(),
|
|
4777
|
+
searchMethod: z73.string().optional(),
|
|
4778
|
+
limit: z73.number().gte(1).lte(100).optional(),
|
|
4779
|
+
offset: z73.number().gte(0).optional(),
|
|
4780
|
+
vectorWeight: z73.number().gte(0).lte(1).optional(),
|
|
4781
|
+
fulltextWeight: z73.number().gte(0).lte(1).optional(),
|
|
4782
|
+
threshold: z73.number().gte(0).lte(1).optional(),
|
|
4783
|
+
explain: z73.boolean().optional(),
|
|
4784
|
+
asOfTime: z73.string().optional(),
|
|
4785
|
+
validAtTime: z73.string().optional(),
|
|
4786
|
+
eventTimeFrom: z73.string().optional(),
|
|
4787
|
+
eventTimeTo: z73.string().optional(),
|
|
4788
|
+
ingestionTimeFrom: z73.string().optional(),
|
|
4789
|
+
ingestionTimeTo: z73.string().optional(),
|
|
4790
|
+
includeExpired: z73.boolean().optional(),
|
|
4791
|
+
temporalMode: z73.string().optional(),
|
|
4792
|
+
topics: z73.array(z73.string()).optional(),
|
|
4793
|
+
memoryType: z73.string().optional(),
|
|
4794
|
+
conversationId: z73.string().optional(),
|
|
4795
|
+
includeTopics: z73.boolean().optional(),
|
|
4796
|
+
includeEntities: z73.boolean().optional()
|
|
4797
|
+
}).transform((data) => ({
|
|
4798
|
+
query: data["query"],
|
|
4799
|
+
mode: data["mode"],
|
|
4800
|
+
searchMethod: data["searchMethod"],
|
|
4801
|
+
limit: data["limit"],
|
|
4802
|
+
offset: data["offset"],
|
|
4803
|
+
vectorWeight: data["vectorWeight"],
|
|
4804
|
+
fulltextWeight: data["fulltextWeight"],
|
|
4805
|
+
threshold: data["threshold"],
|
|
4806
|
+
explain: data["explain"],
|
|
4807
|
+
asOfTime: data["asOfTime"],
|
|
4808
|
+
validAtTime: data["validAtTime"],
|
|
4809
|
+
eventTimeFrom: data["eventTimeFrom"],
|
|
4810
|
+
eventTimeTo: data["eventTimeTo"],
|
|
4811
|
+
ingestionTimeFrom: data["ingestionTimeFrom"],
|
|
4812
|
+
ingestionTimeTo: data["ingestionTimeTo"],
|
|
4813
|
+
includeExpired: data["includeExpired"],
|
|
4814
|
+
temporalMode: data["temporalMode"],
|
|
4815
|
+
topics: data["topics"],
|
|
4816
|
+
memoryType: data["memoryType"],
|
|
4817
|
+
conversationId: data["conversationId"],
|
|
4818
|
+
includeTopics: data["includeTopics"],
|
|
4819
|
+
includeEntities: data["includeEntities"]
|
|
4820
|
+
}));
|
|
4821
|
+
});
|
|
4822
|
+
|
|
4823
4823
|
// src/services/memories/models/get-similar-memories-ok-response.ts
|
|
4824
4824
|
import { z as z76 } from "zod";
|
|
4825
4825
|
|
|
@@ -5303,6 +5303,137 @@ var MemoriesService = class extends BaseService {
|
|
|
5303
5303
|
}).setRetryAttempts(this.config, requestConfig).setRetryDelayMs(this.config, requestConfig).setResponseValidation(this.config, requestConfig).addHeaderParam({ key: "Content-Type", value: "application/json" }).addBody(body).build();
|
|
5304
5304
|
return this.client.call(request);
|
|
5305
5305
|
}
|
|
5306
|
+
/**
|
|
5307
|
+
* Search memories using query parameters. Provides the same functionality asPOST /api/memories/search but accepts parameters via query string.
|
|
5308
|
+
|
|
5309
|
+
**Benefits of GET:**
|
|
5310
|
+
- Faster response times (~3x improvement)
|
|
5311
|
+
- Browser/CDN caching support
|
|
5312
|
+
- Simpler integration for read-only clients
|
|
5313
|
+
|
|
5314
|
+
**Search Methods:**
|
|
5315
|
+
- **hybrid** (default): Combines semantic and keyword search with Reciprocal Rank Fusion
|
|
5316
|
+
- **semantic**: Vector-based semantic search using OpenAI embeddings
|
|
5317
|
+
- **keyword**: Traditional fulltext search using Lucene
|
|
5318
|
+
|
|
5319
|
+
**Array Parameters:**
|
|
5320
|
+
- `topics`: Provide as comma-separated values (e.g., `topics=typescript,api-design`)
|
|
5321
|
+
|
|
5322
|
+
* @param {string} params.q - Search query string
|
|
5323
|
+
* @param {SearchMemoriesGetSearchMethod} [params.searchMethod] - Search algorithm to use
|
|
5324
|
+
* @param {number} [params.limit] - Maximum number of results to return
|
|
5325
|
+
* @param {number} [params.offset] - Number of results to skip for pagination
|
|
5326
|
+
* @param {number} [params.threshold] - Minimum similarity threshold for semantic search
|
|
5327
|
+
* @param {SearchMemoriesGetMode} [params.mode] - Content filtering mode
|
|
5328
|
+
* @param {number} [params.vectorWeight] - Weight for vector similarity in hybrid search
|
|
5329
|
+
* @param {number} [params.fulltextWeight] - Weight for fulltext matching in hybrid search
|
|
5330
|
+
* @param {string} [params.topics] - Comma-separated list of topics to filter by
|
|
5331
|
+
* @param {SearchMemoriesGetMemoryType} [params.memoryType] - Filter by memory type
|
|
5332
|
+
* @param {string} [params.conversationId] - Filter by conversation ID
|
|
5333
|
+
* @param {boolean} [params.explain] - Include detailed match explanations in results
|
|
5334
|
+
* @param {boolean} [params.includeTopics] - Include associated topics in results
|
|
5335
|
+
* @param {boolean} [params.includeEntities] - Include mentioned entities in results
|
|
5336
|
+
* @param {string} [params.asOfTime] - Point-in-time query (ISO 8601 datetime)
|
|
5337
|
+
* @param {string} [params.validAtTime] - Filter by validity time (ISO 8601 datetime)
|
|
5338
|
+
* @param {string} [params.eventTimeFrom] - Event time range start (ISO 8601 datetime)
|
|
5339
|
+
* @param {string} [params.eventTimeTo] - Event time range end (ISO 8601 datetime)
|
|
5340
|
+
* @param {string} [params.ingestionTimeFrom] - Ingestion time range start (ISO 8601 datetime)
|
|
5341
|
+
* @param {string} [params.ingestionTimeTo] - Ingestion time range end (ISO 8601 datetime)
|
|
5342
|
+
* @param {boolean} [params.includeExpired] - Include expired memories in results
|
|
5343
|
+
* @param {SearchMemoriesGetTemporalMode} [params.temporalMode] - Temporal query mode
|
|
5344
|
+
* @param {RequestConfig} [requestConfig] - The request configuration for retry and validation.
|
|
5345
|
+
* @returns {Promise<HttpResponse<SearchResponse>>} - Search results
|
|
5346
|
+
*/
|
|
5347
|
+
async searchMemoriesGet(params, requestConfig) {
|
|
5348
|
+
const request = new RequestBuilder().setBaseUrl((requestConfig == null ? void 0 : requestConfig.baseUrl) || this.config.baseUrl || this.config.environment || "http://localhost:3000" /* DEFAULT */).setConfig(this.config).setMethod("GET").setPath("/api/memories/search").setRequestSchema(z81.any()).addAccessTokenAuth(this.config.token).setRequestContentType("json" /* Json */).addResponse({
|
|
5349
|
+
schema: searchResponseResponse,
|
|
5350
|
+
contentType: "json" /* Json */,
|
|
5351
|
+
status: 200
|
|
5352
|
+
}).addError({
|
|
5353
|
+
error: Error2,
|
|
5354
|
+
contentType: "json" /* Json */,
|
|
5355
|
+
status: 400
|
|
5356
|
+
}).addError({
|
|
5357
|
+
error: Error2,
|
|
5358
|
+
contentType: "json" /* Json */,
|
|
5359
|
+
status: 401
|
|
5360
|
+
}).addError({
|
|
5361
|
+
error: Error2,
|
|
5362
|
+
contentType: "json" /* Json */,
|
|
5363
|
+
status: 422
|
|
5364
|
+
}).addError({
|
|
5365
|
+
error: Error2,
|
|
5366
|
+
contentType: "json" /* Json */,
|
|
5367
|
+
status: 500
|
|
5368
|
+
}).setRetryAttempts(this.config, requestConfig).setRetryDelayMs(this.config, requestConfig).setResponseValidation(this.config, requestConfig).addQueryParam({
|
|
5369
|
+
key: "q",
|
|
5370
|
+
value: params == null ? void 0 : params.q
|
|
5371
|
+
}).addQueryParam({
|
|
5372
|
+
key: "searchMethod",
|
|
5373
|
+
value: params == null ? void 0 : params.searchMethod
|
|
5374
|
+
}).addQueryParam({
|
|
5375
|
+
key: "limit",
|
|
5376
|
+
value: params == null ? void 0 : params.limit
|
|
5377
|
+
}).addQueryParam({
|
|
5378
|
+
key: "offset",
|
|
5379
|
+
value: params == null ? void 0 : params.offset
|
|
5380
|
+
}).addQueryParam({
|
|
5381
|
+
key: "threshold",
|
|
5382
|
+
value: params == null ? void 0 : params.threshold
|
|
5383
|
+
}).addQueryParam({
|
|
5384
|
+
key: "mode",
|
|
5385
|
+
value: params == null ? void 0 : params.mode
|
|
5386
|
+
}).addQueryParam({
|
|
5387
|
+
key: "vectorWeight",
|
|
5388
|
+
value: params == null ? void 0 : params.vectorWeight
|
|
5389
|
+
}).addQueryParam({
|
|
5390
|
+
key: "fulltextWeight",
|
|
5391
|
+
value: params == null ? void 0 : params.fulltextWeight
|
|
5392
|
+
}).addQueryParam({
|
|
5393
|
+
key: "topics",
|
|
5394
|
+
value: params == null ? void 0 : params.topics
|
|
5395
|
+
}).addQueryParam({
|
|
5396
|
+
key: "memoryType",
|
|
5397
|
+
value: params == null ? void 0 : params.memoryType
|
|
5398
|
+
}).addQueryParam({
|
|
5399
|
+
key: "conversationId",
|
|
5400
|
+
value: params == null ? void 0 : params.conversationId
|
|
5401
|
+
}).addQueryParam({
|
|
5402
|
+
key: "explain",
|
|
5403
|
+
value: params == null ? void 0 : params.explain
|
|
5404
|
+
}).addQueryParam({
|
|
5405
|
+
key: "includeTopics",
|
|
5406
|
+
value: params == null ? void 0 : params.includeTopics
|
|
5407
|
+
}).addQueryParam({
|
|
5408
|
+
key: "includeEntities",
|
|
5409
|
+
value: params == null ? void 0 : params.includeEntities
|
|
5410
|
+
}).addQueryParam({
|
|
5411
|
+
key: "asOfTime",
|
|
5412
|
+
value: params == null ? void 0 : params.asOfTime
|
|
5413
|
+
}).addQueryParam({
|
|
5414
|
+
key: "validAtTime",
|
|
5415
|
+
value: params == null ? void 0 : params.validAtTime
|
|
5416
|
+
}).addQueryParam({
|
|
5417
|
+
key: "eventTimeFrom",
|
|
5418
|
+
value: params == null ? void 0 : params.eventTimeFrom
|
|
5419
|
+
}).addQueryParam({
|
|
5420
|
+
key: "eventTimeTo",
|
|
5421
|
+
value: params == null ? void 0 : params.eventTimeTo
|
|
5422
|
+
}).addQueryParam({
|
|
5423
|
+
key: "ingestionTimeFrom",
|
|
5424
|
+
value: params == null ? void 0 : params.ingestionTimeFrom
|
|
5425
|
+
}).addQueryParam({
|
|
5426
|
+
key: "ingestionTimeTo",
|
|
5427
|
+
value: params == null ? void 0 : params.ingestionTimeTo
|
|
5428
|
+
}).addQueryParam({
|
|
5429
|
+
key: "includeExpired",
|
|
5430
|
+
value: params == null ? void 0 : params.includeExpired
|
|
5431
|
+
}).addQueryParam({
|
|
5432
|
+
key: "temporalMode",
|
|
5433
|
+
value: params == null ? void 0 : params.temporalMode
|
|
5434
|
+
}).build();
|
|
5435
|
+
return this.client.call(request);
|
|
5436
|
+
}
|
|
5306
5437
|
/**
|
|
5307
5438
|
* Search memories using different search methods:- **hybrid** (default): Combines semantic and keyword search with Reciprocal Rank Fusion
|
|
5308
5439
|
- **semantic**: Vector-based semantic search using OpenAI embeddings
|
|
@@ -5482,29 +5613,61 @@ var MemoryMemoryType2 = /* @__PURE__ */ ((MemoryMemoryType22) => {
|
|
|
5482
5613
|
return MemoryMemoryType22;
|
|
5483
5614
|
})(MemoryMemoryType2 || {});
|
|
5484
5615
|
|
|
5485
|
-
// src/services/memories/models/
|
|
5486
|
-
var
|
|
5487
|
-
|
|
5488
|
-
|
|
5489
|
-
|
|
5490
|
-
return
|
|
5491
|
-
})(
|
|
5492
|
-
|
|
5493
|
-
// src/services/memories/models/search-
|
|
5494
|
-
var
|
|
5495
|
-
|
|
5496
|
-
|
|
5497
|
-
|
|
5498
|
-
return
|
|
5499
|
-
})(
|
|
5500
|
-
|
|
5501
|
-
// src/services/memories/models/
|
|
5502
|
-
var
|
|
5503
|
-
|
|
5504
|
-
|
|
5505
|
-
|
|
5506
|
-
return
|
|
5507
|
-
})(
|
|
5616
|
+
// src/services/memories/models/search-memories-get-search-method.ts
|
|
5617
|
+
var SearchMemoriesGetSearchMethod = /* @__PURE__ */ ((SearchMemoriesGetSearchMethod2) => {
|
|
5618
|
+
SearchMemoriesGetSearchMethod2["KEYWORD"] = "keyword";
|
|
5619
|
+
SearchMemoriesGetSearchMethod2["SEMANTIC"] = "semantic";
|
|
5620
|
+
SearchMemoriesGetSearchMethod2["HYBRID"] = "hybrid";
|
|
5621
|
+
return SearchMemoriesGetSearchMethod2;
|
|
5622
|
+
})(SearchMemoriesGetSearchMethod || {});
|
|
5623
|
+
|
|
5624
|
+
// src/services/memories/models/search-memories-get-mode.ts
|
|
5625
|
+
var SearchMemoriesGetMode = /* @__PURE__ */ ((SearchMemoriesGetMode2) => {
|
|
5626
|
+
SearchMemoriesGetMode2["UNIFIED"] = "unified";
|
|
5627
|
+
SearchMemoriesGetMode2["CONTENT"] = "content";
|
|
5628
|
+
SearchMemoriesGetMode2["FACTS"] = "facts";
|
|
5629
|
+
return SearchMemoriesGetMode2;
|
|
5630
|
+
})(SearchMemoriesGetMode || {});
|
|
5631
|
+
|
|
5632
|
+
// src/services/memories/models/search-memories-get-memory-type.ts
|
|
5633
|
+
var SearchMemoriesGetMemoryType = /* @__PURE__ */ ((SearchMemoriesGetMemoryType2) => {
|
|
5634
|
+
SearchMemoriesGetMemoryType2["EPISODIC"] = "episodic";
|
|
5635
|
+
SearchMemoriesGetMemoryType2["SEMANTIC"] = "semantic";
|
|
5636
|
+
SearchMemoriesGetMemoryType2["PROCEDURAL"] = "procedural";
|
|
5637
|
+
return SearchMemoriesGetMemoryType2;
|
|
5638
|
+
})(SearchMemoriesGetMemoryType || {});
|
|
5639
|
+
|
|
5640
|
+
// src/services/memories/models/search-memories-get-temporal-mode.ts
|
|
5641
|
+
var SearchMemoriesGetTemporalMode = /* @__PURE__ */ ((SearchMemoriesGetTemporalMode2) => {
|
|
5642
|
+
SearchMemoriesGetTemporalMode2["CURRENT"] = "current";
|
|
5643
|
+
SearchMemoriesGetTemporalMode2["HISTORICAL"] = "historical";
|
|
5644
|
+
SearchMemoriesGetTemporalMode2["EVOLUTION"] = "evolution";
|
|
5645
|
+
return SearchMemoriesGetTemporalMode2;
|
|
5646
|
+
})(SearchMemoriesGetTemporalMode || {});
|
|
5647
|
+
|
|
5648
|
+
// src/services/memories/models/search-request-mode.ts
|
|
5649
|
+
var SearchRequestMode = /* @__PURE__ */ ((SearchRequestMode2) => {
|
|
5650
|
+
SearchRequestMode2["UNIFIED"] = "unified";
|
|
5651
|
+
SearchRequestMode2["CONTENT"] = "content";
|
|
5652
|
+
SearchRequestMode2["FACTS"] = "facts";
|
|
5653
|
+
return SearchRequestMode2;
|
|
5654
|
+
})(SearchRequestMode || {});
|
|
5655
|
+
|
|
5656
|
+
// src/services/memories/models/search-request-search-method.ts
|
|
5657
|
+
var SearchRequestSearchMethod = /* @__PURE__ */ ((SearchRequestSearchMethod2) => {
|
|
5658
|
+
SearchRequestSearchMethod2["KEYWORD"] = "keyword";
|
|
5659
|
+
SearchRequestSearchMethod2["SEMANTIC"] = "semantic";
|
|
5660
|
+
SearchRequestSearchMethod2["HYBRID"] = "hybrid";
|
|
5661
|
+
return SearchRequestSearchMethod2;
|
|
5662
|
+
})(SearchRequestSearchMethod || {});
|
|
5663
|
+
|
|
5664
|
+
// src/services/memories/models/search-request-temporal-mode.ts
|
|
5665
|
+
var SearchRequestTemporalMode = /* @__PURE__ */ ((SearchRequestTemporalMode2) => {
|
|
5666
|
+
SearchRequestTemporalMode2["CURRENT"] = "current";
|
|
5667
|
+
SearchRequestTemporalMode2["HISTORICAL"] = "historical";
|
|
5668
|
+
SearchRequestTemporalMode2["EVOLUTION"] = "evolution";
|
|
5669
|
+
return SearchRequestTemporalMode2;
|
|
5670
|
+
})(SearchRequestTemporalMode || {});
|
|
5508
5671
|
|
|
5509
5672
|
// src/services/memories/models/search-request-memory-type.ts
|
|
5510
5673
|
var SearchRequestMemoryType = /* @__PURE__ */ ((SearchRequestMemoryType2) => {
|
|
@@ -7777,6 +7940,473 @@ var CommunitiesService = class extends BaseService {
|
|
|
7777
7940
|
}
|
|
7778
7941
|
};
|
|
7779
7942
|
|
|
7943
|
+
// src/services/users/users-service.ts
|
|
7944
|
+
import { z as z157 } from "zod";
|
|
7945
|
+
|
|
7946
|
+
// src/services/users/models/sync-user-request.ts
|
|
7947
|
+
import { z as z148 } from "zod";
|
|
7948
|
+
var syncUserRequest = z148.lazy(() => {
|
|
7949
|
+
return z148.object({
|
|
7950
|
+
workosId: z148.string(),
|
|
7951
|
+
email: z148.string(),
|
|
7952
|
+
firstName: z148.string().optional().nullable(),
|
|
7953
|
+
lastName: z148.string().optional().nullable(),
|
|
7954
|
+
profilePictureUrl: z148.string().optional().nullable()
|
|
7955
|
+
});
|
|
7956
|
+
});
|
|
7957
|
+
var syncUserRequestResponse = z148.lazy(() => {
|
|
7958
|
+
return z148.object({
|
|
7959
|
+
workosId: z148.string(),
|
|
7960
|
+
email: z148.string(),
|
|
7961
|
+
firstName: z148.string().optional().nullable(),
|
|
7962
|
+
lastName: z148.string().optional().nullable(),
|
|
7963
|
+
profilePictureUrl: z148.string().optional().nullable()
|
|
7964
|
+
}).transform((data) => ({
|
|
7965
|
+
workosId: data["workosId"],
|
|
7966
|
+
email: data["email"],
|
|
7967
|
+
firstName: data["firstName"],
|
|
7968
|
+
lastName: data["lastName"],
|
|
7969
|
+
profilePictureUrl: data["profilePictureUrl"]
|
|
7970
|
+
}));
|
|
7971
|
+
});
|
|
7972
|
+
var syncUserRequestRequest = z148.lazy(() => {
|
|
7973
|
+
return z148.object({
|
|
7974
|
+
workosId: z148.string(),
|
|
7975
|
+
email: z148.string(),
|
|
7976
|
+
firstName: z148.string().optional().nullable(),
|
|
7977
|
+
lastName: z148.string().optional().nullable(),
|
|
7978
|
+
profilePictureUrl: z148.string().optional().nullable()
|
|
7979
|
+
}).transform((data) => ({
|
|
7980
|
+
workosId: data["workosId"],
|
|
7981
|
+
email: data["email"],
|
|
7982
|
+
firstName: data["firstName"],
|
|
7983
|
+
lastName: data["lastName"],
|
|
7984
|
+
profilePictureUrl: data["profilePictureUrl"]
|
|
7985
|
+
}));
|
|
7986
|
+
});
|
|
7987
|
+
|
|
7988
|
+
// src/services/users/models/sync-user-ok-response.ts
|
|
7989
|
+
import { z as z150 } from "zod";
|
|
7990
|
+
|
|
7991
|
+
// src/services/users/models/user.ts
|
|
7992
|
+
import { z as z149 } from "zod";
|
|
7993
|
+
var user = z149.lazy(() => {
|
|
7994
|
+
return z149.object({
|
|
7995
|
+
id: z149.string(),
|
|
7996
|
+
email: z149.string(),
|
|
7997
|
+
firstName: z149.string().nullable(),
|
|
7998
|
+
lastName: z149.string().nullable(),
|
|
7999
|
+
profilePictureUrl: z149.string().nullable(),
|
|
8000
|
+
plan: z149.string(),
|
|
8001
|
+
memoryLimit: z149.number(),
|
|
8002
|
+
retentionDays: z149.number().nullable(),
|
|
8003
|
+
createdAt: z149.string(),
|
|
8004
|
+
updatedAt: z149.string()
|
|
8005
|
+
});
|
|
8006
|
+
});
|
|
8007
|
+
var userResponse = z149.lazy(() => {
|
|
8008
|
+
return z149.object({
|
|
8009
|
+
id: z149.string(),
|
|
8010
|
+
email: z149.string(),
|
|
8011
|
+
firstName: z149.string().nullable(),
|
|
8012
|
+
lastName: z149.string().nullable(),
|
|
8013
|
+
profilePictureUrl: z149.string().nullable(),
|
|
8014
|
+
plan: z149.string(),
|
|
8015
|
+
memoryLimit: z149.number(),
|
|
8016
|
+
retentionDays: z149.number().nullable(),
|
|
8017
|
+
createdAt: z149.string(),
|
|
8018
|
+
updatedAt: z149.string()
|
|
8019
|
+
}).transform((data) => ({
|
|
8020
|
+
id: data["id"],
|
|
8021
|
+
email: data["email"],
|
|
8022
|
+
firstName: data["firstName"],
|
|
8023
|
+
lastName: data["lastName"],
|
|
8024
|
+
profilePictureUrl: data["profilePictureUrl"],
|
|
8025
|
+
plan: data["plan"],
|
|
8026
|
+
memoryLimit: data["memoryLimit"],
|
|
8027
|
+
retentionDays: data["retentionDays"],
|
|
8028
|
+
createdAt: data["createdAt"],
|
|
8029
|
+
updatedAt: data["updatedAt"]
|
|
8030
|
+
}));
|
|
8031
|
+
});
|
|
8032
|
+
var userRequest = z149.lazy(() => {
|
|
8033
|
+
return z149.object({
|
|
8034
|
+
id: z149.string(),
|
|
8035
|
+
email: z149.string(),
|
|
8036
|
+
firstName: z149.string().nullable(),
|
|
8037
|
+
lastName: z149.string().nullable(),
|
|
8038
|
+
profilePictureUrl: z149.string().nullable(),
|
|
8039
|
+
plan: z149.string(),
|
|
8040
|
+
memoryLimit: z149.number(),
|
|
8041
|
+
retentionDays: z149.number().nullable(),
|
|
8042
|
+
createdAt: z149.string(),
|
|
8043
|
+
updatedAt: z149.string()
|
|
8044
|
+
}).transform((data) => ({
|
|
8045
|
+
id: data["id"],
|
|
8046
|
+
email: data["email"],
|
|
8047
|
+
firstName: data["firstName"],
|
|
8048
|
+
lastName: data["lastName"],
|
|
8049
|
+
profilePictureUrl: data["profilePictureUrl"],
|
|
8050
|
+
plan: data["plan"],
|
|
8051
|
+
memoryLimit: data["memoryLimit"],
|
|
8052
|
+
retentionDays: data["retentionDays"],
|
|
8053
|
+
createdAt: data["createdAt"],
|
|
8054
|
+
updatedAt: data["updatedAt"]
|
|
8055
|
+
}));
|
|
8056
|
+
});
|
|
8057
|
+
|
|
8058
|
+
// src/services/users/models/sync-user-ok-response.ts
|
|
8059
|
+
var syncUserOkResponse = z150.lazy(() => {
|
|
8060
|
+
return z150.object({
|
|
8061
|
+
data: user.optional(),
|
|
8062
|
+
created: z150.boolean().optional()
|
|
8063
|
+
});
|
|
8064
|
+
});
|
|
8065
|
+
var syncUserOkResponseResponse = z150.lazy(() => {
|
|
8066
|
+
return z150.object({
|
|
8067
|
+
data: userResponse.optional(),
|
|
8068
|
+
created: z150.boolean().optional()
|
|
8069
|
+
}).transform((data) => ({
|
|
8070
|
+
data: data["data"],
|
|
8071
|
+
created: data["created"]
|
|
8072
|
+
}));
|
|
8073
|
+
});
|
|
8074
|
+
var syncUserOkResponseRequest = z150.lazy(() => {
|
|
8075
|
+
return z150.object({
|
|
8076
|
+
data: userRequest.optional(),
|
|
8077
|
+
created: z150.boolean().optional()
|
|
8078
|
+
}).transform((data) => ({
|
|
8079
|
+
data: data["data"],
|
|
8080
|
+
created: data["created"]
|
|
8081
|
+
}));
|
|
8082
|
+
});
|
|
8083
|
+
|
|
8084
|
+
// src/services/users/models/get-current-user-ok-response.ts
|
|
8085
|
+
import { z as z152 } from "zod";
|
|
8086
|
+
|
|
8087
|
+
// src/services/users/models/user-usage.ts
|
|
8088
|
+
import { z as z151 } from "zod";
|
|
8089
|
+
var userUsage = z151.lazy(() => {
|
|
8090
|
+
return z151.object({
|
|
8091
|
+
memoriesUsed: z151.number(),
|
|
8092
|
+
memoryLimit: z151.number(),
|
|
8093
|
+
memoriesRemaining: z151.number(),
|
|
8094
|
+
percentUsed: z151.number(),
|
|
8095
|
+
plan: z151.string(),
|
|
8096
|
+
periodStart: z151.string(),
|
|
8097
|
+
periodEnd: z151.string()
|
|
8098
|
+
});
|
|
8099
|
+
});
|
|
8100
|
+
var userUsageResponse = z151.lazy(() => {
|
|
8101
|
+
return z151.object({
|
|
8102
|
+
memoriesUsed: z151.number(),
|
|
8103
|
+
memoryLimit: z151.number(),
|
|
8104
|
+
memoriesRemaining: z151.number(),
|
|
8105
|
+
percentUsed: z151.number(),
|
|
8106
|
+
plan: z151.string(),
|
|
8107
|
+
periodStart: z151.string(),
|
|
8108
|
+
periodEnd: z151.string()
|
|
8109
|
+
}).transform((data) => ({
|
|
8110
|
+
memoriesUsed: data["memoriesUsed"],
|
|
8111
|
+
memoryLimit: data["memoryLimit"],
|
|
8112
|
+
memoriesRemaining: data["memoriesRemaining"],
|
|
8113
|
+
percentUsed: data["percentUsed"],
|
|
8114
|
+
plan: data["plan"],
|
|
8115
|
+
periodStart: data["periodStart"],
|
|
8116
|
+
periodEnd: data["periodEnd"]
|
|
8117
|
+
}));
|
|
8118
|
+
});
|
|
8119
|
+
var userUsageRequest = z151.lazy(() => {
|
|
8120
|
+
return z151.object({
|
|
8121
|
+
memoriesUsed: z151.number(),
|
|
8122
|
+
memoryLimit: z151.number(),
|
|
8123
|
+
memoriesRemaining: z151.number(),
|
|
8124
|
+
percentUsed: z151.number(),
|
|
8125
|
+
plan: z151.string(),
|
|
8126
|
+
periodStart: z151.string(),
|
|
8127
|
+
periodEnd: z151.string()
|
|
8128
|
+
}).transform((data) => ({
|
|
8129
|
+
memoriesUsed: data["memoriesUsed"],
|
|
8130
|
+
memoryLimit: data["memoryLimit"],
|
|
8131
|
+
memoriesRemaining: data["memoriesRemaining"],
|
|
8132
|
+
percentUsed: data["percentUsed"],
|
|
8133
|
+
plan: data["plan"],
|
|
8134
|
+
periodStart: data["periodStart"],
|
|
8135
|
+
periodEnd: data["periodEnd"]
|
|
8136
|
+
}));
|
|
8137
|
+
});
|
|
8138
|
+
|
|
8139
|
+
// src/services/users/models/get-current-user-ok-response.ts
|
|
8140
|
+
var getCurrentUserOkResponse = z152.lazy(() => {
|
|
8141
|
+
return z152.object({
|
|
8142
|
+
data: user.optional(),
|
|
8143
|
+
usage: userUsage.optional()
|
|
8144
|
+
});
|
|
8145
|
+
});
|
|
8146
|
+
var getCurrentUserOkResponseResponse = z152.lazy(() => {
|
|
8147
|
+
return z152.object({
|
|
8148
|
+
data: userResponse.optional(),
|
|
8149
|
+
usage: userUsageResponse.optional()
|
|
8150
|
+
}).transform((data) => ({
|
|
8151
|
+
data: data["data"],
|
|
8152
|
+
usage: data["usage"]
|
|
8153
|
+
}));
|
|
8154
|
+
});
|
|
8155
|
+
var getCurrentUserOkResponseRequest = z152.lazy(() => {
|
|
8156
|
+
return z152.object({
|
|
8157
|
+
data: userRequest.optional(),
|
|
8158
|
+
usage: userUsageRequest.optional()
|
|
8159
|
+
}).transform((data) => ({
|
|
8160
|
+
data: data["data"],
|
|
8161
|
+
usage: data["usage"]
|
|
8162
|
+
}));
|
|
8163
|
+
});
|
|
8164
|
+
|
|
8165
|
+
// src/services/users/models/update-current-user-request.ts
|
|
8166
|
+
import { z as z153 } from "zod";
|
|
8167
|
+
var updateCurrentUserRequest = z153.lazy(() => {
|
|
8168
|
+
return z153.object({
|
|
8169
|
+
firstName: z153.string().optional().nullable(),
|
|
8170
|
+
lastName: z153.string().optional().nullable(),
|
|
8171
|
+
profilePictureUrl: z153.string().optional().nullable()
|
|
8172
|
+
});
|
|
8173
|
+
});
|
|
8174
|
+
var updateCurrentUserRequestResponse = z153.lazy(() => {
|
|
8175
|
+
return z153.object({
|
|
8176
|
+
firstName: z153.string().optional().nullable(),
|
|
8177
|
+
lastName: z153.string().optional().nullable(),
|
|
8178
|
+
profilePictureUrl: z153.string().optional().nullable()
|
|
8179
|
+
}).transform((data) => ({
|
|
8180
|
+
firstName: data["firstName"],
|
|
8181
|
+
lastName: data["lastName"],
|
|
8182
|
+
profilePictureUrl: data["profilePictureUrl"]
|
|
8183
|
+
}));
|
|
8184
|
+
});
|
|
8185
|
+
var updateCurrentUserRequestRequest = z153.lazy(() => {
|
|
8186
|
+
return z153.object({
|
|
8187
|
+
firstName: z153.string().optional().nullable(),
|
|
8188
|
+
lastName: z153.string().optional().nullable(),
|
|
8189
|
+
profilePictureUrl: z153.string().optional().nullable()
|
|
8190
|
+
}).transform((data) => ({
|
|
8191
|
+
firstName: data["firstName"],
|
|
8192
|
+
lastName: data["lastName"],
|
|
8193
|
+
profilePictureUrl: data["profilePictureUrl"]
|
|
8194
|
+
}));
|
|
8195
|
+
});
|
|
8196
|
+
|
|
8197
|
+
// src/services/users/models/update-current-user-ok-response.ts
|
|
8198
|
+
import { z as z154 } from "zod";
|
|
8199
|
+
var updateCurrentUserOkResponse = z154.lazy(() => {
|
|
8200
|
+
return z154.object({
|
|
8201
|
+
data: user.optional()
|
|
8202
|
+
});
|
|
8203
|
+
});
|
|
8204
|
+
var updateCurrentUserOkResponseResponse = z154.lazy(() => {
|
|
8205
|
+
return z154.object({
|
|
8206
|
+
data: userResponse.optional()
|
|
8207
|
+
}).transform((data) => ({
|
|
8208
|
+
data: data["data"]
|
|
8209
|
+
}));
|
|
8210
|
+
});
|
|
8211
|
+
var updateCurrentUserOkResponseRequest = z154.lazy(() => {
|
|
8212
|
+
return z154.object({
|
|
8213
|
+
data: userRequest.optional()
|
|
8214
|
+
}).transform((data) => ({
|
|
8215
|
+
data: data["data"]
|
|
8216
|
+
}));
|
|
8217
|
+
});
|
|
8218
|
+
|
|
8219
|
+
// src/services/users/models/get-current-user-usage-ok-response.ts
|
|
8220
|
+
import { z as z155 } from "zod";
|
|
8221
|
+
var getCurrentUserUsageOkResponse = z155.lazy(() => {
|
|
8222
|
+
return z155.object({
|
|
8223
|
+
data: userUsage.optional()
|
|
8224
|
+
});
|
|
8225
|
+
});
|
|
8226
|
+
var getCurrentUserUsageOkResponseResponse = z155.lazy(() => {
|
|
8227
|
+
return z155.object({
|
|
8228
|
+
data: userUsageResponse.optional()
|
|
8229
|
+
}).transform((data) => ({
|
|
8230
|
+
data: data["data"]
|
|
8231
|
+
}));
|
|
8232
|
+
});
|
|
8233
|
+
var getCurrentUserUsageOkResponseRequest = z155.lazy(() => {
|
|
8234
|
+
return z155.object({
|
|
8235
|
+
data: userUsageRequest.optional()
|
|
8236
|
+
}).transform((data) => ({
|
|
8237
|
+
data: data["data"]
|
|
8238
|
+
}));
|
|
8239
|
+
});
|
|
8240
|
+
|
|
8241
|
+
// src/services/users/models/get-user-by-id-ok-response.ts
|
|
8242
|
+
import { z as z156 } from "zod";
|
|
8243
|
+
var getUserByIdOkResponse = z156.lazy(() => {
|
|
8244
|
+
return z156.object({
|
|
8245
|
+
data: user.optional()
|
|
8246
|
+
});
|
|
8247
|
+
});
|
|
8248
|
+
var getUserByIdOkResponseResponse = z156.lazy(() => {
|
|
8249
|
+
return z156.object({
|
|
8250
|
+
data: userResponse.optional()
|
|
8251
|
+
}).transform((data) => ({
|
|
8252
|
+
data: data["data"]
|
|
8253
|
+
}));
|
|
8254
|
+
});
|
|
8255
|
+
var getUserByIdOkResponseRequest = z156.lazy(() => {
|
|
8256
|
+
return z156.object({
|
|
8257
|
+
data: userRequest.optional()
|
|
8258
|
+
}).transform((data) => ({
|
|
8259
|
+
data: data["data"]
|
|
8260
|
+
}));
|
|
8261
|
+
});
|
|
8262
|
+
|
|
8263
|
+
// src/services/users/users-service.ts
|
|
8264
|
+
var UsersService = class extends BaseService {
|
|
8265
|
+
/**
|
|
8266
|
+
* Called by the customer portal after WorkOS authentication.Creates a new user if they don't exist, or updates their profile if they do.
|
|
8267
|
+
This is the main entry point for user provisioning.
|
|
8268
|
+
|
|
8269
|
+
* @param {RequestConfig} [requestConfig] - The request configuration for retry and validation.
|
|
8270
|
+
* @returns {Promise<HttpResponse<SyncUserOkResponse>>} - User synced successfully
|
|
8271
|
+
*/
|
|
8272
|
+
async syncUser(body, requestConfig) {
|
|
8273
|
+
const request = new RequestBuilder().setBaseUrl((requestConfig == null ? void 0 : requestConfig.baseUrl) || this.config.baseUrl || this.config.environment || "http://localhost:3000" /* DEFAULT */).setConfig(this.config).setMethod("POST").setPath("/api/users/sync").setRequestSchema(syncUserRequestRequest).addAccessTokenAuth(this.config.token).setRequestContentType("json" /* Json */).addResponse({
|
|
8274
|
+
schema: syncUserOkResponseResponse,
|
|
8275
|
+
contentType: "json" /* Json */,
|
|
8276
|
+
status: 200
|
|
8277
|
+
}).addError({
|
|
8278
|
+
error: Error2,
|
|
8279
|
+
contentType: "json" /* Json */,
|
|
8280
|
+
status: 400
|
|
8281
|
+
}).addError({
|
|
8282
|
+
error: Error2,
|
|
8283
|
+
contentType: "json" /* Json */,
|
|
8284
|
+
status: 500
|
|
8285
|
+
}).setRetryAttempts(this.config, requestConfig).setRetryDelayMs(this.config, requestConfig).setResponseValidation(this.config, requestConfig).addHeaderParam({ key: "Content-Type", value: "application/json" }).addBody(body).build();
|
|
8286
|
+
return this.client.call(request);
|
|
8287
|
+
}
|
|
8288
|
+
/**
|
|
8289
|
+
* Get the currently authenticated user's profile and usage information
|
|
8290
|
+
* @param {RequestConfig} [requestConfig] - The request configuration for retry and validation.
|
|
8291
|
+
* @returns {Promise<HttpResponse<GetCurrentUserOkResponse>>} - User retrieved successfully
|
|
8292
|
+
*/
|
|
8293
|
+
async getCurrentUser(requestConfig) {
|
|
8294
|
+
const request = new RequestBuilder().setBaseUrl((requestConfig == null ? void 0 : requestConfig.baseUrl) || this.config.baseUrl || this.config.environment || "http://localhost:3000" /* DEFAULT */).setConfig(this.config).setMethod("GET").setPath("/api/users/me").setRequestSchema(z157.any()).addAccessTokenAuth(this.config.token).setRequestContentType("json" /* Json */).addResponse({
|
|
8295
|
+
schema: getCurrentUserOkResponseResponse,
|
|
8296
|
+
contentType: "json" /* Json */,
|
|
8297
|
+
status: 200
|
|
8298
|
+
}).addError({
|
|
8299
|
+
error: Error2,
|
|
8300
|
+
contentType: "json" /* Json */,
|
|
8301
|
+
status: 401
|
|
8302
|
+
}).addError({
|
|
8303
|
+
error: Error2,
|
|
8304
|
+
contentType: "json" /* Json */,
|
|
8305
|
+
status: 404
|
|
8306
|
+
}).addError({
|
|
8307
|
+
error: Error2,
|
|
8308
|
+
contentType: "json" /* Json */,
|
|
8309
|
+
status: 500
|
|
8310
|
+
}).setRetryAttempts(this.config, requestConfig).setRetryDelayMs(this.config, requestConfig).setResponseValidation(this.config, requestConfig).build();
|
|
8311
|
+
return this.client.call(request);
|
|
8312
|
+
}
|
|
8313
|
+
/**
|
|
8314
|
+
* Update the currently authenticated user's profile
|
|
8315
|
+
* @param {RequestConfig} [requestConfig] - The request configuration for retry and validation.
|
|
8316
|
+
* @returns {Promise<HttpResponse<UpdateCurrentUserOkResponse>>} - User updated successfully
|
|
8317
|
+
*/
|
|
8318
|
+
async updateCurrentUser(body, requestConfig) {
|
|
8319
|
+
const request = new RequestBuilder().setBaseUrl((requestConfig == null ? void 0 : requestConfig.baseUrl) || this.config.baseUrl || this.config.environment || "http://localhost:3000" /* DEFAULT */).setConfig(this.config).setMethod("PATCH").setPath("/api/users/me").setRequestSchema(updateCurrentUserRequestRequest).addAccessTokenAuth(this.config.token).setRequestContentType("json" /* Json */).addResponse({
|
|
8320
|
+
schema: updateCurrentUserOkResponseResponse,
|
|
8321
|
+
contentType: "json" /* Json */,
|
|
8322
|
+
status: 200
|
|
8323
|
+
}).addError({
|
|
8324
|
+
error: Error2,
|
|
8325
|
+
contentType: "json" /* Json */,
|
|
8326
|
+
status: 401
|
|
8327
|
+
}).addError({
|
|
8328
|
+
error: Error2,
|
|
8329
|
+
contentType: "json" /* Json */,
|
|
8330
|
+
status: 404
|
|
8331
|
+
}).addError({
|
|
8332
|
+
error: Error2,
|
|
8333
|
+
contentType: "json" /* Json */,
|
|
8334
|
+
status: 500
|
|
8335
|
+
}).setRetryAttempts(this.config, requestConfig).setRetryDelayMs(this.config, requestConfig).setResponseValidation(this.config, requestConfig).addHeaderParam({ key: "Content-Type", value: "application/json" }).addBody(body).build();
|
|
8336
|
+
return this.client.call(request);
|
|
8337
|
+
}
|
|
8338
|
+
/**
|
|
8339
|
+
* Get the currently authenticated user's memory usage statistics
|
|
8340
|
+
* @param {RequestConfig} [requestConfig] - The request configuration for retry and validation.
|
|
8341
|
+
* @returns {Promise<HttpResponse<GetCurrentUserUsageOkResponse>>} - Usage retrieved successfully
|
|
8342
|
+
*/
|
|
8343
|
+
async getCurrentUserUsage(requestConfig) {
|
|
8344
|
+
const request = new RequestBuilder().setBaseUrl((requestConfig == null ? void 0 : requestConfig.baseUrl) || this.config.baseUrl || this.config.environment || "http://localhost:3000" /* DEFAULT */).setConfig(this.config).setMethod("GET").setPath("/api/users/me/usage").setRequestSchema(z157.any()).addAccessTokenAuth(this.config.token).setRequestContentType("json" /* Json */).addResponse({
|
|
8345
|
+
schema: getCurrentUserUsageOkResponseResponse,
|
|
8346
|
+
contentType: "json" /* Json */,
|
|
8347
|
+
status: 200
|
|
8348
|
+
}).addError({
|
|
8349
|
+
error: Error2,
|
|
8350
|
+
contentType: "json" /* Json */,
|
|
8351
|
+
status: 401
|
|
8352
|
+
}).addError({
|
|
8353
|
+
error: Error2,
|
|
8354
|
+
contentType: "json" /* Json */,
|
|
8355
|
+
status: 404
|
|
8356
|
+
}).addError({
|
|
8357
|
+
error: Error2,
|
|
8358
|
+
contentType: "json" /* Json */,
|
|
8359
|
+
status: 500
|
|
8360
|
+
}).setRetryAttempts(this.config, requestConfig).setRetryDelayMs(this.config, requestConfig).setResponseValidation(this.config, requestConfig).build();
|
|
8361
|
+
return this.client.call(request);
|
|
8362
|
+
}
|
|
8363
|
+
/**
|
|
8364
|
+
* Get a user by their internal ID (admin only)
|
|
8365
|
+
* @param {string} id -
|
|
8366
|
+
* @param {RequestConfig} [requestConfig] - The request configuration for retry and validation.
|
|
8367
|
+
* @returns {Promise<HttpResponse<GetUserByIdOkResponse>>} - User retrieved successfully
|
|
8368
|
+
*/
|
|
8369
|
+
async getUserById(id, requestConfig) {
|
|
8370
|
+
const request = new RequestBuilder().setBaseUrl((requestConfig == null ? void 0 : requestConfig.baseUrl) || this.config.baseUrl || this.config.environment || "http://localhost:3000" /* DEFAULT */).setConfig(this.config).setMethod("GET").setPath("/api/users/{id}").setRequestSchema(z157.any()).addAccessTokenAuth(this.config.token).setRequestContentType("json" /* Json */).addResponse({
|
|
8371
|
+
schema: getUserByIdOkResponseResponse,
|
|
8372
|
+
contentType: "json" /* Json */,
|
|
8373
|
+
status: 200
|
|
8374
|
+
}).addError({
|
|
8375
|
+
error: Error2,
|
|
8376
|
+
contentType: "json" /* Json */,
|
|
8377
|
+
status: 401
|
|
8378
|
+
}).addError({
|
|
8379
|
+
error: Error2,
|
|
8380
|
+
contentType: "json" /* Json */,
|
|
8381
|
+
status: 404
|
|
8382
|
+
}).addError({
|
|
8383
|
+
error: Error2,
|
|
8384
|
+
contentType: "json" /* Json */,
|
|
8385
|
+
status: 500
|
|
8386
|
+
}).setRetryAttempts(this.config, requestConfig).setRetryDelayMs(this.config, requestConfig).setResponseValidation(this.config, requestConfig).addPathParam({
|
|
8387
|
+
key: "id",
|
|
8388
|
+
value: id
|
|
8389
|
+
}).build();
|
|
8390
|
+
return this.client.call(request);
|
|
8391
|
+
}
|
|
8392
|
+
};
|
|
8393
|
+
|
|
8394
|
+
// src/services/users/models/user-plan.ts
|
|
8395
|
+
var UserPlan = /* @__PURE__ */ ((UserPlan2) => {
|
|
8396
|
+
UserPlan2["FREE"] = "free";
|
|
8397
|
+
UserPlan2["PRO"] = "pro";
|
|
8398
|
+
UserPlan2["ENTERPRISE"] = "enterprise";
|
|
8399
|
+
return UserPlan2;
|
|
8400
|
+
})(UserPlan || {});
|
|
8401
|
+
|
|
8402
|
+
// src/services/users/models/user-usage-plan.ts
|
|
8403
|
+
var UserUsagePlan = /* @__PURE__ */ ((UserUsagePlan2) => {
|
|
8404
|
+
UserUsagePlan2["FREE"] = "free";
|
|
8405
|
+
UserUsagePlan2["PRO"] = "pro";
|
|
8406
|
+
UserUsagePlan2["ENTERPRISE"] = "enterprise";
|
|
8407
|
+
return UserUsagePlan2;
|
|
8408
|
+
})(UserUsagePlan || {});
|
|
8409
|
+
|
|
7780
8410
|
// src/index.ts
|
|
7781
8411
|
var Memnexus = class {
|
|
7782
8412
|
constructor(config) {
|
|
@@ -7793,6 +8423,7 @@ var Memnexus = class {
|
|
|
7793
8423
|
this.behavior = new BehaviorService(this.config);
|
|
7794
8424
|
this.topics = new TopicsService(this.config);
|
|
7795
8425
|
this.communities = new CommunitiesService(this.config);
|
|
8426
|
+
this.users = new UsersService(this.config);
|
|
7796
8427
|
}
|
|
7797
8428
|
set baseUrl(baseUrl) {
|
|
7798
8429
|
this.apiKeys.baseUrl = baseUrl;
|
|
@@ -7807,6 +8438,7 @@ var Memnexus = class {
|
|
|
7807
8438
|
this.behavior.baseUrl = baseUrl;
|
|
7808
8439
|
this.topics.baseUrl = baseUrl;
|
|
7809
8440
|
this.communities.baseUrl = baseUrl;
|
|
8441
|
+
this.users.baseUrl = baseUrl;
|
|
7810
8442
|
}
|
|
7811
8443
|
set environment(environment) {
|
|
7812
8444
|
this.apiKeys.baseUrl = environment;
|
|
@@ -7821,6 +8453,7 @@ var Memnexus = class {
|
|
|
7821
8453
|
this.behavior.baseUrl = environment;
|
|
7822
8454
|
this.topics.baseUrl = environment;
|
|
7823
8455
|
this.communities.baseUrl = environment;
|
|
8456
|
+
this.users.baseUrl = environment;
|
|
7824
8457
|
}
|
|
7825
8458
|
set timeoutMs(timeoutMs) {
|
|
7826
8459
|
this.apiKeys.timeoutMs = timeoutMs;
|
|
@@ -7835,6 +8468,7 @@ var Memnexus = class {
|
|
|
7835
8468
|
this.behavior.timeoutMs = timeoutMs;
|
|
7836
8469
|
this.topics.timeoutMs = timeoutMs;
|
|
7837
8470
|
this.communities.timeoutMs = timeoutMs;
|
|
8471
|
+
this.users.timeoutMs = timeoutMs;
|
|
7838
8472
|
}
|
|
7839
8473
|
set token(token) {
|
|
7840
8474
|
this.apiKeys.token = token;
|
|
@@ -7849,6 +8483,7 @@ var Memnexus = class {
|
|
|
7849
8483
|
this.behavior.token = token;
|
|
7850
8484
|
this.topics.token = token;
|
|
7851
8485
|
this.communities.token = token;
|
|
8486
|
+
this.users.token = token;
|
|
7852
8487
|
}
|
|
7853
8488
|
};
|
|
7854
8489
|
export {
|
|
@@ -7871,15 +8506,22 @@ export {
|
|
|
7871
8506
|
MemoryMemoryType2,
|
|
7872
8507
|
MemoryMemoryType3,
|
|
7873
8508
|
MemoryMemoryType4,
|
|
7874
|
-
Mode,
|
|
7875
8509
|
NoCache,
|
|
7876
8510
|
PatternsService,
|
|
7877
8511
|
Role,
|
|
7878
|
-
|
|
8512
|
+
SearchMemoriesGetMemoryType,
|
|
8513
|
+
SearchMemoriesGetMode,
|
|
8514
|
+
SearchMemoriesGetSearchMethod,
|
|
8515
|
+
SearchMemoriesGetTemporalMode,
|
|
7879
8516
|
SearchRequestMemoryType,
|
|
8517
|
+
SearchRequestMode,
|
|
8518
|
+
SearchRequestSearchMethod,
|
|
8519
|
+
SearchRequestTemporalMode,
|
|
7880
8520
|
ServiceCheckStatus,
|
|
7881
8521
|
SystemService,
|
|
7882
|
-
TemporalMode,
|
|
7883
8522
|
TopicsService,
|
|
7884
|
-
UpdateMemoryRequestMemoryType
|
|
8523
|
+
UpdateMemoryRequestMemoryType,
|
|
8524
|
+
UserPlan,
|
|
8525
|
+
UserUsagePlan,
|
|
8526
|
+
UsersService
|
|
7885
8527
|
};
|