@memnexus-ai/typescript-sdk 1.34.4 → 1.36.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 +15 -135
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +33 -92
- package/dist/index.d.ts +33 -92
- package/dist/index.js +15 -133
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -24,7 +24,6 @@ __export(index_exports, {
|
|
|
24
24
|
ArtifactsService: () => ArtifactsService,
|
|
25
25
|
BehaviorService: () => BehaviorService,
|
|
26
26
|
BillingService: () => BillingService,
|
|
27
|
-
CommunitiesService: () => CommunitiesService,
|
|
28
27
|
ContentType: () => ContentType,
|
|
29
28
|
ConversationsService: () => ConversationsService,
|
|
30
29
|
EntitiesService: () => EntitiesService,
|
|
@@ -84,7 +83,6 @@ __export(index_exports, {
|
|
|
84
83
|
memory: () => memory,
|
|
85
84
|
memoryRelationship: () => memoryRelationship,
|
|
86
85
|
memoryRelationshipsResponse: () => memoryRelationshipsResponse,
|
|
87
|
-
mergeCommunitiesRequest: () => mergeCommunitiesRequest,
|
|
88
86
|
namedMemoryHistoryResponse: () => namedMemoryHistoryResponse,
|
|
89
87
|
narrativeMemory: () => narrativeMemory,
|
|
90
88
|
narrativeThread: () => narrativeThread,
|
|
@@ -4003,111 +4001,6 @@ var TopicsService = class extends BaseService {
|
|
|
4003
4001
|
}
|
|
4004
4002
|
};
|
|
4005
4003
|
|
|
4006
|
-
// src/services/communities-service.ts
|
|
4007
|
-
var CommunitiesService = class extends BaseService {
|
|
4008
|
-
/**
|
|
4009
|
-
* List communities
|
|
4010
|
-
* List all communities with pagination
|
|
4011
|
-
* @param limit - Maximum number of communities to return
|
|
4012
|
-
* @param offset - Number of communities to skip
|
|
4013
|
-
*/
|
|
4014
|
-
async listCommunities(options) {
|
|
4015
|
-
const request = new Request({
|
|
4016
|
-
baseUrl: this.config.baseUrl || "http://localhost:3000",
|
|
4017
|
-
method: "GET",
|
|
4018
|
-
path: "/api/topics/communities",
|
|
4019
|
-
config: this.config,
|
|
4020
|
-
retry: {
|
|
4021
|
-
attempts: 3,
|
|
4022
|
-
delayMs: 150,
|
|
4023
|
-
maxDelayMs: 5e3,
|
|
4024
|
-
jitterMs: 50,
|
|
4025
|
-
backoffFactor: 2
|
|
4026
|
-
}
|
|
4027
|
-
});
|
|
4028
|
-
if (options?.limit !== void 0) {
|
|
4029
|
-
request.addQueryParam("limit", {
|
|
4030
|
-
key: "limit",
|
|
4031
|
-
value: options.limit,
|
|
4032
|
-
explode: false,
|
|
4033
|
-
encode: true,
|
|
4034
|
-
style: "form",
|
|
4035
|
-
isLimit: true,
|
|
4036
|
-
isOffset: false,
|
|
4037
|
-
isCursor: false
|
|
4038
|
-
});
|
|
4039
|
-
}
|
|
4040
|
-
if (options?.offset !== void 0) {
|
|
4041
|
-
request.addQueryParam("offset", {
|
|
4042
|
-
key: "offset",
|
|
4043
|
-
value: options.offset,
|
|
4044
|
-
explode: false,
|
|
4045
|
-
encode: true,
|
|
4046
|
-
style: "form",
|
|
4047
|
-
isLimit: false,
|
|
4048
|
-
isOffset: true,
|
|
4049
|
-
isCursor: false
|
|
4050
|
-
});
|
|
4051
|
-
}
|
|
4052
|
-
return this.client.call(request);
|
|
4053
|
-
}
|
|
4054
|
-
/**
|
|
4055
|
-
* Get community by ID
|
|
4056
|
-
* Retrieve a specific community by its ID
|
|
4057
|
-
* @param id - The community ID
|
|
4058
|
-
*/
|
|
4059
|
-
async getCommunityById(id) {
|
|
4060
|
-
const request = new Request({
|
|
4061
|
-
baseUrl: this.config.baseUrl || "http://localhost:3000",
|
|
4062
|
-
method: "GET",
|
|
4063
|
-
path: "/api/topics/communities/{id}",
|
|
4064
|
-
config: this.config,
|
|
4065
|
-
retry: {
|
|
4066
|
-
attempts: 3,
|
|
4067
|
-
delayMs: 150,
|
|
4068
|
-
maxDelayMs: 5e3,
|
|
4069
|
-
jitterMs: 50,
|
|
4070
|
-
backoffFactor: 2
|
|
4071
|
-
}
|
|
4072
|
-
});
|
|
4073
|
-
request.addPathParam("id", {
|
|
4074
|
-
key: "id",
|
|
4075
|
-
value: id,
|
|
4076
|
-
explode: false,
|
|
4077
|
-
encode: true,
|
|
4078
|
-
style: "simple",
|
|
4079
|
-
isLimit: false,
|
|
4080
|
-
isOffset: false,
|
|
4081
|
-
isCursor: false
|
|
4082
|
-
});
|
|
4083
|
-
return this.client.call(request);
|
|
4084
|
-
}
|
|
4085
|
-
/**
|
|
4086
|
-
* Merge communities
|
|
4087
|
-
* Merge two communities into one
|
|
4088
|
-
* @param body - Request body
|
|
4089
|
-
*/
|
|
4090
|
-
async mergeCommunities(body) {
|
|
4091
|
-
const request = new Request({
|
|
4092
|
-
baseUrl: this.config.baseUrl || "http://localhost:3000",
|
|
4093
|
-
method: "POST",
|
|
4094
|
-
path: "/api/topics/communities/merge",
|
|
4095
|
-
config: this.config,
|
|
4096
|
-
retry: {
|
|
4097
|
-
attempts: 3,
|
|
4098
|
-
delayMs: 150,
|
|
4099
|
-
maxDelayMs: 5e3,
|
|
4100
|
-
jitterMs: 50,
|
|
4101
|
-
backoffFactor: 2
|
|
4102
|
-
}
|
|
4103
|
-
});
|
|
4104
|
-
if (body !== void 0) {
|
|
4105
|
-
request.addBody(body);
|
|
4106
|
-
}
|
|
4107
|
-
return this.client.call(request);
|
|
4108
|
-
}
|
|
4109
|
-
};
|
|
4110
|
-
|
|
4111
4004
|
// src/services/users-service.ts
|
|
4112
4005
|
var UsersService = class extends BaseService {
|
|
4113
4006
|
/**
|
|
@@ -4926,6 +4819,20 @@ var factSearchRequest = import_zod.z.object({
|
|
|
4926
4819
|
/** Maximum number of results to return */
|
|
4927
4820
|
limit: import_zod.z.number().min(1).max(100).optional()
|
|
4928
4821
|
});
|
|
4822
|
+
var community = import_zod.z.object({
|
|
4823
|
+
/** Unique identifier for the community */
|
|
4824
|
+
id: import_zod.z.string(),
|
|
4825
|
+
/** Community name */
|
|
4826
|
+
name: import_zod.z.string(),
|
|
4827
|
+
/** Community description */
|
|
4828
|
+
description: import_zod.z.string().nullable().optional(),
|
|
4829
|
+
/** Number of topics in this community */
|
|
4830
|
+
topicCount: import_zod.z.number().min(0).optional(),
|
|
4831
|
+
/** Creation timestamp */
|
|
4832
|
+
createdAt: import_zod.z.string().datetime(),
|
|
4833
|
+
/** Last update timestamp */
|
|
4834
|
+
updatedAt: import_zod.z.string().datetime()
|
|
4835
|
+
});
|
|
4929
4836
|
var entityNode = import_zod.z.object({
|
|
4930
4837
|
/** Unique identifier for the entity */
|
|
4931
4838
|
id: import_zod.z.string(),
|
|
@@ -5004,26 +4911,6 @@ var updateArtifactRequest = import_zod.z.object({
|
|
|
5004
4911
|
/** Additional metadata */
|
|
5005
4912
|
metadata: import_zod.z.object({}).optional()
|
|
5006
4913
|
});
|
|
5007
|
-
var community = import_zod.z.object({
|
|
5008
|
-
/** Unique identifier for the community */
|
|
5009
|
-
id: import_zod.z.string(),
|
|
5010
|
-
/** Community name */
|
|
5011
|
-
name: import_zod.z.string(),
|
|
5012
|
-
/** Community description */
|
|
5013
|
-
description: import_zod.z.string().nullable().optional(),
|
|
5014
|
-
/** Number of topics in this community */
|
|
5015
|
-
topicCount: import_zod.z.number().min(0).optional(),
|
|
5016
|
-
/** Creation timestamp */
|
|
5017
|
-
createdAt: import_zod.z.string().datetime(),
|
|
5018
|
-
/** Last update timestamp */
|
|
5019
|
-
updatedAt: import_zod.z.string().datetime()
|
|
5020
|
-
});
|
|
5021
|
-
var mergeCommunitiesRequest = import_zod.z.object({
|
|
5022
|
-
/** Source community ID to merge from */
|
|
5023
|
-
sourceCommunityId: import_zod.z.string().min(1),
|
|
5024
|
-
/** Target community ID to merge into */
|
|
5025
|
-
targetCommunityId: import_zod.z.string().min(1)
|
|
5026
|
-
});
|
|
5027
4914
|
var memoryRelationship = import_zod.z.object({
|
|
5028
4915
|
/** Unique relationship identifier */
|
|
5029
4916
|
id: import_zod.z.string(),
|
|
@@ -5196,6 +5083,7 @@ var user = import_zod.z.object({
|
|
|
5196
5083
|
firstName: import_zod.z.string().nullable(),
|
|
5197
5084
|
lastName: import_zod.z.string().nullable(),
|
|
5198
5085
|
profilePictureUrl: import_zod.z.string().url().nullable(),
|
|
5086
|
+
status: import_zod.z.enum(["active", "suspended", "disabled"]),
|
|
5199
5087
|
plan: import_zod.z.enum(["free", "pro", "enterprise"]),
|
|
5200
5088
|
memoryLimit: import_zod.z.number(),
|
|
5201
5089
|
retentionDays: import_zod.z.number().nullable(),
|
|
@@ -5449,8 +5337,6 @@ var Memnexus = class {
|
|
|
5449
5337
|
behavior;
|
|
5450
5338
|
/** Topic detection, clustering, and management endpoints operations */
|
|
5451
5339
|
topics;
|
|
5452
|
-
/** Topic community detection and management endpoints operations */
|
|
5453
|
-
communities;
|
|
5454
5340
|
/** User management and profile endpoints operations */
|
|
5455
5341
|
users;
|
|
5456
5342
|
/**
|
|
@@ -5477,7 +5363,6 @@ var Memnexus = class {
|
|
|
5477
5363
|
this.patterns = new PatternsService(this.config);
|
|
5478
5364
|
this.behavior = new BehaviorService(this.config);
|
|
5479
5365
|
this.topics = new TopicsService(this.config);
|
|
5480
|
-
this.communities = new CommunitiesService(this.config);
|
|
5481
5366
|
this.users = new UsersService(this.config);
|
|
5482
5367
|
}
|
|
5483
5368
|
/**
|
|
@@ -5501,7 +5386,6 @@ var Memnexus = class {
|
|
|
5501
5386
|
this.patterns.token = token;
|
|
5502
5387
|
this.behavior.token = token;
|
|
5503
5388
|
this.topics.token = token;
|
|
5504
|
-
this.communities.token = token;
|
|
5505
5389
|
this.users.token = token;
|
|
5506
5390
|
}
|
|
5507
5391
|
/**
|
|
@@ -5525,7 +5409,6 @@ var Memnexus = class {
|
|
|
5525
5409
|
this.patterns.baseUrl = baseUrl;
|
|
5526
5410
|
this.behavior.baseUrl = baseUrl;
|
|
5527
5411
|
this.topics.baseUrl = baseUrl;
|
|
5528
|
-
this.communities.baseUrl = baseUrl;
|
|
5529
5412
|
this.users.baseUrl = baseUrl;
|
|
5530
5413
|
}
|
|
5531
5414
|
/**
|
|
@@ -5549,7 +5432,6 @@ var Memnexus = class {
|
|
|
5549
5432
|
this.patterns.environment = environment;
|
|
5550
5433
|
this.behavior.environment = environment;
|
|
5551
5434
|
this.topics.environment = environment;
|
|
5552
|
-
this.communities.environment = environment;
|
|
5553
5435
|
this.users.environment = environment;
|
|
5554
5436
|
}
|
|
5555
5437
|
};
|
|
@@ -5560,7 +5442,6 @@ var index_default = Memnexus;
|
|
|
5560
5442
|
ArtifactsService,
|
|
5561
5443
|
BehaviorService,
|
|
5562
5444
|
BillingService,
|
|
5563
|
-
CommunitiesService,
|
|
5564
5445
|
ContentType,
|
|
5565
5446
|
ConversationsService,
|
|
5566
5447
|
EntitiesService,
|
|
@@ -5619,7 +5500,6 @@ var index_default = Memnexus;
|
|
|
5619
5500
|
memory,
|
|
5620
5501
|
memoryRelationship,
|
|
5621
5502
|
memoryRelationshipsResponse,
|
|
5622
|
-
mergeCommunitiesRequest,
|
|
5623
5503
|
namedMemoryHistoryResponse,
|
|
5624
5504
|
narrativeMemory,
|
|
5625
5505
|
narrativeThread,
|