@memnexus-ai/typescript-sdk 1.53.27 → 1.54.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.d.ts CHANGED
@@ -116,6 +116,36 @@ interface Hook {
116
116
  afterResponse(request: HttpRequest, response: HttpResponse<any>, params: Map<string, string>): Promise<HttpResponse<any>>;
117
117
  onError(request: HttpRequest, response: HttpResponse<any>, params: Map<string, string>): Promise<HttpError>;
118
118
  }
119
+ /**
120
+ * Typed error thrown by the SDK for non-2xx HTTP responses.
121
+ * Use `instanceof SdkError` to catch API errors and access the status code directly.
122
+ *
123
+ * @example
124
+ * ```ts
125
+ * try {
126
+ * await sdk.memories.createMemory({ name: 'my-note', content: '...' });
127
+ * } catch (e) {
128
+ * if (e instanceof SdkError && e.status === 409) {
129
+ * // Named memory already exists — upsert via updateNamedMemory
130
+ * }
131
+ * }
132
+ * ```
133
+ */
134
+ declare class SdkError extends Error {
135
+ /** HTTP status code (e.g. 404, 409) */
136
+ readonly status: number;
137
+ /** HTTP status text (e.g. "Not Found") */
138
+ readonly statusText: string;
139
+ /** Parsed response body, if any */
140
+ readonly data: unknown;
141
+ constructor(
142
+ /** HTTP status code (e.g. 404, 409) */
143
+ status: number,
144
+ /** HTTP status text (e.g. "Not Found") */
145
+ statusText: string,
146
+ /** Parsed response body, if any */
147
+ data: unknown, message: string);
148
+ }
119
149
 
120
150
  /**
121
151
  * Request builder for constructing HTTP requests.
@@ -244,6 +274,133 @@ declare class BaseService {
244
274
  set token(token: string);
245
275
  }
246
276
 
277
+ /**
278
+ * AdminService - Admin management endpoints for invite codes and platform configuration API operations.
279
+ * Auto-generated by sdk-generator - do not edit manually.
280
+ */
281
+
282
+ /**
283
+ * Admin management endpoints for invite codes and platform configuration
284
+ */
285
+ declare class AdminService extends BaseService {
286
+ /**
287
+ * List invite codes
288
+ * List all invite codes with optional status filter
289
+ * @param status - Filter by status
290
+ * @param limit -
291
+ * @param offset -
292
+ */
293
+ adminListInviteCodes(options?: {
294
+ status?: 'active' | 'exhausted' | 'revoked' | 'expired';
295
+ limit?: number;
296
+ offset?: number;
297
+ }): Promise<HttpResponse<{
298
+ invites?: {
299
+ id?: string;
300
+ code?: string;
301
+ email?: string;
302
+ label?: string;
303
+ maxUses?: number;
304
+ currentUses?: number;
305
+ status?: string;
306
+ expiresAt?: string;
307
+ createdAt?: string;
308
+ }[];
309
+ total?: number;
310
+ }>>;
311
+ /**
312
+ * Create invite code
313
+ * Create a new invite code for the gated preview
314
+ * @param body - Request body
315
+ */
316
+ adminCreateInviteCode(body: {
317
+ email: string;
318
+ label: string;
319
+ maxUses?: number;
320
+ code?: string;
321
+ expiresAt?: string;
322
+ metadata?: Record<string, unknown>;
323
+ }): Promise<HttpResponse<{
324
+ id?: string;
325
+ code?: string;
326
+ label?: string;
327
+ maxUses?: number;
328
+ currentUses?: number;
329
+ status?: string;
330
+ expiresAt?: string;
331
+ createdAt?: string;
332
+ shareUrl?: string;
333
+ }>>;
334
+ /**
335
+ * Get invite system statistics
336
+ * Aggregate statistics for the invite system
337
+ */
338
+ adminGetInviteStats(): Promise<HttpResponse<{
339
+ totalCodes?: number;
340
+ activeCodes?: number;
341
+ totalRedemptions?: number;
342
+ totalCapacity?: number;
343
+ utilizationRate?: number;
344
+ recentRedemptions?: {
345
+ code?: string;
346
+ email?: string;
347
+ redeemedAt?: string;
348
+ }[];
349
+ }>>;
350
+ /**
351
+ * Get invite code details
352
+ * Get details for a single invite code including redemptions
353
+ * @param code - The invite code
354
+ */
355
+ adminGetInviteCode(code: string): Promise<HttpResponse<{
356
+ id?: string;
357
+ code?: string;
358
+ email?: string;
359
+ label?: string;
360
+ maxUses?: number;
361
+ currentUses?: number;
362
+ status?: string;
363
+ redemptions?: {
364
+ userId?: string;
365
+ email?: string;
366
+ redeemedAt?: string;
367
+ }[];
368
+ }>>;
369
+ /**
370
+ * Revoke an invite code
371
+ * Revoke an invite code. Existing accounts created with this code are unaffected.
372
+ * @param code -
373
+ */
374
+ adminRevokeInviteCode(code: string): Promise<HttpResponse<{
375
+ code?: string;
376
+ status?: string;
377
+ message?: string;
378
+ }>>;
379
+ /**
380
+ * Get gate status with audit info
381
+ * Get current invite gate state with audit information
382
+ */
383
+ adminGetGateStatus(): Promise<HttpResponse<{
384
+ gated?: boolean;
385
+ updatedAt?: string;
386
+ updatedBy?: string;
387
+ }>>;
388
+ /**
389
+ * Toggle invite gate
390
+ * Toggle the invite gate. When enabled (true), new signups require a valid invite code.
391
+ When disabled (false), registration is open. Takes effect immediately.
392
+
393
+ * @param body - Request body
394
+ */
395
+ adminSetGateStatus(body: {
396
+ enabled: boolean;
397
+ }): Promise<HttpResponse<{
398
+ gated?: boolean;
399
+ updatedAt?: string;
400
+ message?: string;
401
+ }>>;
402
+ }
403
+
247
404
  /**
248
405
  * Zod schemas for API models.
249
406
  * Auto-generated by sdk-generator - do not edit manually.
@@ -5787,376 +5944,358 @@ type BuildContextMeta = z.infer<typeof buildContextMeta>;
5787
5944
  type BuildContextResponse = z.infer<typeof buildContextResponse>;
5788
5945
 
5789
5946
  /**
5790
- * UsersService - User management and profile endpoints API operations.
5947
+ * ApiKeysService - API key management endpoints API operations.
5791
5948
  * Auto-generated by sdk-generator - do not edit manually.
5792
5949
  */
5793
5950
 
5794
5951
  /**
5795
- * User management and profile endpoints
5952
+ * API key management endpoints
5796
5953
  */
5797
- declare class UsersService extends BaseService {
5954
+ declare class ApiKeysService extends BaseService {
5798
5955
  /**
5799
- * Sync user from WorkOS
5800
- * Called by the customer portal after WorkOS authentication.
5801
- Creates a new user if they don't exist, or updates their profile if they do.
5802
- This is the main entry point for user provisioning.
5803
- When the invite gate is closed and a new user is created, the inviteCode
5804
- is redeemed atomically to track which code was used for registration.
5805
-
5806
- * @param body - Request body
5956
+ * Get user information for current API key
5957
+ * Debug endpoint to retrieve user ID and authentication method from the current API key
5807
5958
  */
5808
- syncUser(body: {
5809
- workosId: string;
5810
- email: string;
5811
- firstName?: string;
5812
- lastName?: string;
5813
- profilePictureUrl?: string;
5814
- inviteCode?: string;
5815
- }): Promise<HttpResponse<{
5816
- data?: User;
5817
- created?: boolean;
5959
+ debugUser(): Promise<HttpResponse<{
5960
+ data?: {
5961
+ userId?: string;
5962
+ authMethod?: string;
5963
+ };
5818
5964
  }>>;
5819
5965
  /**
5820
- * Get current user
5821
- * Get the currently authenticated user's profile and usage information
5966
+ * List API keys
5967
+ * List all API keys for the authenticated user
5822
5968
  */
5823
- getCurrentUser(): Promise<HttpResponse<{
5824
- data?: User;
5825
- usage?: UserUsage;
5969
+ listApiKeys(): Promise<HttpResponse<{
5970
+ data?: ApiKey[];
5826
5971
  }>>;
5827
5972
  /**
5828
- * Update current user
5829
- * Update the currently authenticated user's profile
5973
+ * Create API key
5974
+ * Create a new API key for the authenticated user
5830
5975
  * @param body - Request body
5831
5976
  */
5832
- updateCurrentUser(options?: {
5977
+ createApiKey(options?: {
5833
5978
  body?: {
5834
- firstName?: string;
5835
- lastName?: string;
5836
- profilePictureUrl?: string;
5979
+ label?: string;
5980
+ expiresAt?: string;
5837
5981
  };
5838
5982
  }): Promise<HttpResponse<{
5839
- data?: User;
5840
- }>>;
5841
- /**
5842
- * Get current user's usage
5843
- * Get the currently authenticated user's memory usage statistics
5844
- */
5845
- getCurrentUserUsage(): Promise<HttpResponse<{
5846
- data?: UserUsage;
5847
- }>>;
5848
- /**
5849
- * Export all user data
5850
- * Export all user data as a JSON archive. Includes profile, memories,
5851
- conversations, facts, and patterns. Supports GDPR Article 20
5852
- (right to data portability). Sensitive fields (Stripe customer ID,
5853
- WorkOS ID, embeddings) are excluded.
5854
-
5855
- */
5856
- exportUserData(): Promise<HttpResponse<{
5857
- exportVersion?: string;
5858
- exportedAt?: string;
5859
- counts?: {
5860
- memories?: number;
5861
- conversations?: number;
5862
- facts?: number;
5863
- patterns?: number;
5983
+ data?: {
5984
+ apiKey?: string;
5985
+ keyInfo?: ApiKey;
5864
5986
  };
5865
- profile?: Record<string, unknown>;
5866
- memories?: Memory[];
5867
- conversations?: Conversation[];
5868
- facts?: Fact[];
5869
- patterns?: Pattern[];
5870
- }>>;
5871
- /**
5872
- * Initiate account deletion
5873
- * Schedule the current user's account for deletion after a 7-day grace period.
5874
- Requires email confirmation. Immediately revokes API keys and cancels
5875
- any active subscription. The account enters read-only mode.
5876
-
5877
- * @param body - Request body
5878
- */
5879
- initiateAccountDeletion(body: {
5880
- confirmationEmail: string;
5881
- }): Promise<HttpResponse<{
5882
- data?: User;
5883
- message?: string;
5884
- }>>;
5885
- /**
5886
- * Cancel account deletion
5887
- * Cancel a pending account deletion during the grace period.
5888
- Note: Previously revoked API keys are not restored — new keys must be created.
5889
- Stripe subscription may need manual reactivation via the billing portal.
5890
-
5891
- */
5892
- cancelAccountDeletion(): Promise<HttpResponse<{
5893
- data?: User;
5894
- message?: string;
5895
5987
  }>>;
5896
5988
  /**
5897
- * Get user by ID
5898
- * Get a user by their internal ID (admin only)
5899
- * @param id -
5989
+ * Delete API key
5990
+ * Delete (revoke) an API key by its ID
5991
+ * @param id - The API key ID
5900
5992
  */
5901
- getUserById(id: string): Promise<HttpResponse<{
5902
- data?: User;
5903
- }>>;
5993
+ deleteApiKey(id: string): Promise<HttpResponse<void>>;
5904
5994
  }
5905
5995
 
5906
5996
  /**
5907
- * TopicsService - Topic detection, clustering, and management endpoints API operations.
5997
+ * ArtifactsService - Artifact storage and retrieval endpoints API operations.
5908
5998
  * Auto-generated by sdk-generator - do not edit manually.
5909
5999
  */
5910
6000
 
5911
6001
  /**
5912
- * Topic detection, clustering, and management endpoints
6002
+ * Artifact storage and retrieval endpoints
5913
6003
  */
5914
- declare class TopicsService extends BaseService {
6004
+ declare class ArtifactsService extends BaseService {
5915
6005
  /**
5916
- * List topics
5917
- * List all topics with pagination
5918
- * @param limit - Maximum number of topics to return
5919
- * @param offset - Number of topics to skip
5920
- * @param sortBy - Field to sort topics by
5921
- * @param order - Sort order
6006
+ * List artifacts
6007
+ * List all artifacts for the authenticated user with optional filters
6008
+ * @param limit - Maximum number of artifacts to return
6009
+ * @param offset - Number of artifacts to skip
6010
+ * @param memoryId - Filter by memory ID
6011
+ * @param conversationId - Filter by conversation ID
6012
+ * @param type - Filter by artifact type
5922
6013
  */
5923
- listTopics(options?: {
6014
+ listArtifacts(options?: {
5924
6015
  limit?: number;
5925
6016
  offset?: number;
5926
- sortBy?: 'name' | 'memoryCount';
5927
- order?: 'asc' | 'desc';
6017
+ memoryId?: string;
6018
+ conversationId?: string;
6019
+ type?: string;
5928
6020
  }): Promise<HttpResponse<{
5929
- data?: Topic[];
5930
- pagination?: {
5931
- limit?: number;
5932
- offset?: number;
5933
- count?: number;
5934
- };
6021
+ data?: Artifact[];
6022
+ count?: number;
5935
6023
  }>>;
5936
6024
  /**
5937
- * Get topic by ID
5938
- * Retrieve a specific topic by its ID
5939
- * @param id - The topic ID
6025
+ * Create artifact
6026
+ * Create a new artifact for the authenticated user
6027
+ * @param body - Request body
5940
6028
  */
5941
- getTopicById(id: string): Promise<HttpResponse<{
5942
- data?: Topic;
6029
+ createArtifact(body: {
6030
+ content: string;
6031
+ type: string;
6032
+ name?: string;
6033
+ description?: string;
6034
+ memoryId?: string;
6035
+ conversationId?: string;
6036
+ metadata?: Record<string, unknown>;
6037
+ }): Promise<HttpResponse<{
6038
+ data?: Artifact;
5943
6039
  }>>;
5944
6040
  /**
5945
- * Merge topics
5946
- * Merge two topics into one
6041
+ * Get artifact by ID
6042
+ * Retrieve a specific artifact by its ID
6043
+ * @param id - The artifact ID
6044
+ */
6045
+ getArtifactById(id: string): Promise<HttpResponse<{
6046
+ data?: Artifact;
6047
+ }>>;
6048
+ /**
6049
+ * Delete artifact
6050
+ * Delete an artifact by its ID
6051
+ * @param id - The artifact ID
6052
+ */
6053
+ deleteArtifact(id: string): Promise<HttpResponse<void>>;
6054
+ /**
6055
+ * Update artifact
6056
+ * Update an existing artifact with partial data
6057
+ * @param id - The artifact ID
5947
6058
  * @param body - Request body
5948
6059
  */
5949
- mergeTopics(body: {
5950
- sourceTopicId: string;
5951
- targetTopicId: string;
6060
+ updateArtifact(id: string, body: {
6061
+ content?: string;
6062
+ type?: string;
6063
+ name?: string;
6064
+ description?: string;
6065
+ metadata?: Record<string, unknown>;
5952
6066
  }): Promise<HttpResponse<{
5953
- data?: Topic;
6067
+ data?: Artifact;
6068
+ }>>;
6069
+ }
6070
+
6071
+ /**
6072
+ * BillingService - Subscription billing and payment management endpoints API operations.
6073
+ * Auto-generated by sdk-generator - do not edit manually.
6074
+ */
6075
+
6076
+ /**
6077
+ * Subscription billing and payment management endpoints
6078
+ */
6079
+ declare class BillingService extends BaseService {
6080
+ /**
6081
+ * Get billing overview
6082
+ * Get subscription, payment method, and upcoming invoice information
6083
+ */
6084
+ getBillingOverview(): Promise<HttpResponse<{
6085
+ data?: BillingOverview;
5954
6086
  }>>;
5955
6087
  /**
5956
- * Discover related topics
5957
- * Discover topics related to a given topic
6088
+ * Create checkout session
6089
+ * Create a Stripe checkout session for subscription upgrade
5958
6090
  * @param body - Request body
5959
6091
  */
5960
- discoverRelatedTopics(body: {
5961
- topicId: string;
5962
- limit?: number;
6092
+ createCheckoutSession(body: {
6093
+ priceId?: string;
6094
+ successUrl: string;
6095
+ cancelUrl: string;
5963
6096
  }): Promise<HttpResponse<{
5964
- data?: Topic[];
6097
+ data?: CheckoutSessionResponse;
5965
6098
  }>>;
5966
6099
  /**
5967
- * Calculate topic similarity
5968
- * Calculate similarity score between two topics
6100
+ * Create billing portal session
6101
+ * Create a Stripe billing portal session for managing subscription
5969
6102
  * @param body - Request body
5970
6103
  */
5971
- calculateTopicSimilarity(body: {
5972
- topicId1: string;
5973
- topicId2: string;
6104
+ createPortalSession(body: {
6105
+ returnUrl: string;
5974
6106
  }): Promise<HttpResponse<{
5975
- data?: {
5976
- similarity?: number;
5977
- };
6107
+ data?: PortalSessionResponse;
5978
6108
  }>>;
5979
6109
  /**
5980
- * Find similar topics
5981
- * Find topics similar to a given topic
6110
+ * Get current subscription
6111
+ * Get the current subscription details for the authenticated user
6112
+ */
6113
+ getSubscription(): Promise<HttpResponse<{
6114
+ data?: Subscription;
6115
+ }>>;
6116
+ /**
6117
+ * Cancel subscription
6118
+ * Cancel the current subscription at the end of the billing period
5982
6119
  * @param body - Request body
5983
6120
  */
5984
- findSimilarTopics(body: {
5985
- topicId: string;
5986
- threshold?: number;
5987
- limit?: number;
6121
+ cancelSubscription(options?: {
6122
+ body?: Record<string, unknown>;
5988
6123
  }): Promise<HttpResponse<{
5989
- data?: {
5990
- topic?: Topic;
5991
- similarity?: number;
5992
- }[];
6124
+ data?: Subscription;
5993
6125
  }>>;
5994
6126
  /**
5995
- * Cluster topics
5996
- * Cluster topics using community detection algorithms
6127
+ * Reactivate subscription
6128
+ * Reactivate a subscription that was scheduled for cancellation
5997
6129
  * @param body - Request body
5998
6130
  */
5999
- clusterTopics(options?: {
6000
- body?: {
6001
- minClusterSize?: number;
6002
- };
6131
+ reactivateSubscription(options?: {
6132
+ body?: Record<string, unknown>;
6003
6133
  }): Promise<HttpResponse<{
6004
- data?: {
6005
- clusters?: Record<string, unknown>[];
6006
- clusterCount?: number;
6007
- };
6134
+ data?: Subscription;
6008
6135
  }>>;
6009
6136
  /**
6010
- * Detect communities
6011
- * Detect communities in the topic graph using specified algorithm
6012
- * @param body - Request body
6137
+ * List invoices
6138
+ * Get a list of invoices for the authenticated user
6139
+ * @param limit - Maximum number of invoices to return
6013
6140
  */
6014
- detectCommunities(options?: {
6015
- body?: {
6016
- algorithm?: string;
6017
- };
6141
+ listInvoices(options?: {
6142
+ limit?: number;
6018
6143
  }): Promise<HttpResponse<{
6019
- data?: {
6020
- communities?: Community[];
6021
- communityCount?: number;
6022
- };
6144
+ data?: ListInvoicesResponse;
6023
6145
  }>>;
6024
6146
  /**
6025
- * Search topics
6026
- * Search topics by query string using fulltext search
6147
+ * List payment methods
6148
+ * Get a list of payment methods for the authenticated user
6149
+ */
6150
+ listPaymentMethods(): Promise<HttpResponse<{
6151
+ data?: ListPaymentMethodsResponse;
6152
+ }>>;
6153
+ /**
6154
+ * Set default payment method
6155
+ * Set a payment method as the default for future payments
6156
+ * @param id - The payment method ID
6027
6157
  * @param body - Request body
6028
6158
  */
6029
- searchTopics(body: {
6030
- query: string;
6031
- limit?: number;
6032
- offset?: number;
6159
+ setDefaultPaymentMethod(id: string, options?: {
6160
+ body?: Record<string, unknown>;
6033
6161
  }): Promise<HttpResponse<{
6034
- data?: Record<string, unknown>[];
6035
- total?: number;
6036
- limit?: number;
6037
- offset?: number;
6162
+ message?: string;
6163
+ }>>;
6164
+ /**
6165
+ * Delete payment method
6166
+ * Remove a payment method from the account
6167
+ * @param id - The payment method ID
6168
+ */
6169
+ deletePaymentMethod(id: string): Promise<HttpResponse<void>>;
6170
+ /**
6171
+ * Stripe webhook endpoint
6172
+ * Receive and process Stripe webhook events
6173
+ * @param body - Request body
6174
+ */
6175
+ stripeWebhook(body: Record<string, unknown>): Promise<HttpResponse<{
6176
+ received?: boolean;
6038
6177
  }>>;
6039
6178
  }
6040
6179
 
6041
6180
  /**
6042
- * SystemService - System health, monitoring, and configuration endpoints API operations.
6181
+ * ConversationsService - Conversation tracking and analysis endpoints API operations.
6043
6182
  * Auto-generated by sdk-generator - do not edit manually.
6044
6183
  */
6045
6184
 
6046
6185
  /**
6047
- * System health, monitoring, and configuration endpoints
6186
+ * Conversation tracking and analysis endpoints
6048
6187
  */
6049
- declare class SystemService extends BaseService {
6188
+ declare class ConversationsService extends BaseService {
6050
6189
  /**
6051
- * Get system health status
6052
- * Get the current health status of the system including database connectivity
6190
+ * List conversations
6191
+ * List all conversations for the authenticated user with pagination
6192
+ * @param limit - Maximum number of conversations to return
6193
+ * @param offset - Number of conversations to skip
6194
+ * @param since - Return only conversations created after this timestamp (ISO 8601 format)
6195
+ * @param sortBy - Field to sort conversations by
6196
+ * @param order - Sort order
6197
+ * @param hasMemories - When true, return only conversations that contain at least one memory
6053
6198
  */
6054
- getSystemHealth(): Promise<HttpResponse<{
6055
- data?: {
6056
- status?: 'healthy' | 'unhealthy';
6057
- database?: Record<string, unknown>;
6058
- uptime?: number;
6199
+ listConversations(options?: {
6200
+ limit?: number;
6201
+ offset?: number;
6202
+ since?: string;
6203
+ sortBy?: 'lastActivityAt' | 'createdAt' | 'memoryCount';
6204
+ order?: 'asc' | 'desc';
6205
+ hasMemories?: boolean;
6206
+ }): Promise<HttpResponse<{
6207
+ data?: Conversation[];
6208
+ pagination?: {
6209
+ limit?: number;
6210
+ offset?: number;
6211
+ count?: number;
6059
6212
  };
6060
6213
  }>>;
6061
6214
  /**
6062
- * Get context status
6063
- * Get database statistics and context information
6215
+ * Create conversation
6216
+ * Create a new conversation for the authenticated user
6217
+ * @param body - Request body
6064
6218
  */
6065
- getContextStatus(): Promise<HttpResponse<{
6066
- data?: Record<string, unknown>;
6219
+ createConversation(body: {
6220
+ title: string;
6221
+ summary?: string;
6222
+ }): Promise<HttpResponse<{
6223
+ data?: Conversation;
6067
6224
  }>>;
6068
6225
  /**
6069
- * Get feature flags
6070
- * Get all feature flags for the authenticated user
6226
+ * Get conversation summary
6227
+ * Retrieve a conversation summary by its ID
6228
+ * @param conversationId - The conversation ID
6071
6229
  */
6072
- getFeatureFlags(): Promise<HttpResponse<{
6073
- data?: Record<string, unknown>;
6230
+ getConversationSummary(conversationId: string): Promise<HttpResponse<{
6231
+ data?: Conversation;
6074
6232
  }>>;
6075
6233
  /**
6076
- * Evaluate feature flag
6077
- * Evaluate a specific feature flag for the authenticated user
6078
- * @param body - Request body
6234
+ * Delete conversation
6235
+ * Delete a conversation and soft-delete all associated memories
6236
+ * @param conversationId - The conversation ID
6079
6237
  */
6080
- evaluateFeatureFlag(body: {
6081
- flagName: string;
6082
- context?: Record<string, unknown>;
6083
- }): Promise<HttpResponse<{
6084
- data?: {
6085
- enabled?: boolean;
6086
- flagName?: string;
6087
- };
6238
+ deleteConversation(conversationId: string): Promise<HttpResponse<void>>;
6239
+ /**
6240
+ * Get conversation timeline
6241
+ * Get all memories in a conversation in chronological order
6242
+ * @param conversationId - The conversation ID
6243
+ */
6244
+ getConversationTimeline(conversationId: string): Promise<HttpResponse<{
6245
+ data?: Memory[];
6246
+ count?: number;
6088
6247
  }>>;
6089
6248
  /**
6090
- * Analyze memory quality distribution
6091
- * Analyze the quality distribution of memories for the authenticated user
6092
- * @param includeDetails - Include detailed pruning candidate information
6093
- * @param minQualityThreshold - Minimum quality threshold for pruning candidates (default 0.4)
6249
+ * Search conversations
6250
+ * Search conversations by query string
6251
+ * @param body - Request body
6094
6252
  */
6095
- analyzeMemoryQuality(options?: {
6096
- includeDetails?: boolean;
6097
- minQualityThreshold?: number;
6253
+ searchConversations(body: {
6254
+ query: string;
6255
+ limit?: number;
6098
6256
  }): Promise<HttpResponse<{
6099
- data?: {
6100
- totalMemories?: number;
6101
- qualityDistribution?: {
6102
- high?: number;
6103
- medium?: number;
6104
- low?: number;
6105
- };
6106
- averageQuality?: number;
6107
- pruningCandidates?: number;
6108
- };
6257
+ data?: Conversation[];
6258
+ count?: number;
6109
6259
  }>>;
6110
6260
  /**
6111
- * Prune low-quality memories
6112
- * Prune (soft delete) low-quality memories for the authenticated user
6261
+ * Find conversations by topic
6262
+ * Find conversations that contain a specific topic
6113
6263
  * @param body - Request body
6114
6264
  */
6115
- pruneMemories(options?: {
6116
- body?: {
6117
- targetReduction?: number;
6118
- minQualityThreshold?: number;
6119
- preserveRecent?: boolean;
6120
- recentDaysToPreserve?: number;
6121
- dryRun?: boolean;
6122
- };
6265
+ findConversationsByTopic(body: {
6266
+ topicId: string;
6267
+ limit?: number;
6123
6268
  }): Promise<HttpResponse<{
6124
- data?: {
6125
- prunedCount?: number;
6126
- prunedIds?: string[];
6127
- dryRun?: boolean;
6269
+ data?: Conversation[];
6270
+ count?: number;
6271
+ metadata?: {
6272
+ topicId?: string;
6128
6273
  };
6129
6274
  }>>;
6130
- /**
6131
- * Get OpenAPI specification
6132
- * Returns the OpenAPI 3.x specification for the entire API. This endpoint is used by CI/CD to sync the API Gateway.
6133
- * @param noCache - Bypass cache and regenerate specification
6134
- */
6135
- getOpenApiSpec(options?: {
6136
- noCache?: '1' | 'true';
6137
- }): Promise<HttpResponse<Record<string, unknown>>>;
6138
6275
  }
6139
6276
 
6140
6277
  /**
6141
- * PatternsService - Pattern detection and behavioral analysis endpoints API operations.
6278
+ * EntitiesService - Entity extraction and discovery endpoints API operations.
6142
6279
  * Auto-generated by sdk-generator - do not edit manually.
6143
6280
  */
6144
6281
 
6145
6282
  /**
6146
- * Pattern detection and behavioral analysis endpoints
6283
+ * Entity extraction and discovery endpoints
6147
6284
  */
6148
- declare class PatternsService extends BaseService {
6285
+ declare class EntitiesService extends BaseService {
6149
6286
  /**
6150
- * List patterns
6151
- * List all patterns for the authenticated user
6152
- * @param limit - Maximum number of patterns to return
6153
- * @param offset - Number of patterns to skip
6287
+ * List entities
6288
+ * List all entities for the authenticated user, optionally filtered by type
6289
+ * @param type - Filter by entity type (e.g., PERSON, TECHNOLOGY)
6290
+ * @param limit - Maximum number of entities to return
6291
+ * @param offset - Number of entities to skip
6154
6292
  */
6155
- listPatterns(options?: {
6293
+ listEntities(options?: {
6294
+ type?: string;
6156
6295
  limit?: number;
6157
6296
  offset?: number;
6158
6297
  }): Promise<HttpResponse<{
6159
- data?: Pattern[];
6298
+ data?: EntityNode[];
6160
6299
  pagination?: {
6161
6300
  limit?: number;
6162
6301
  offset?: number;
@@ -6164,267 +6303,239 @@ declare class PatternsService extends BaseService {
6164
6303
  };
6165
6304
  }>>;
6166
6305
  /**
6167
- * Compile patterns
6168
- * Compile patterns from user's memories
6169
- * @param body - Request body
6306
+ * Get entity by ID
6307
+ * Retrieve a specific entity by its ID
6308
+ * @param id - The entity ID
6170
6309
  */
6171
- compilePatterns(options?: {
6172
- body?: {
6173
- minOccurrences?: number;
6174
- timeWindow?: string;
6175
- };
6176
- }): Promise<HttpResponse<{
6177
- data?: Pattern[];
6178
- count?: number;
6310
+ getEntityById(id: string): Promise<HttpResponse<{
6311
+ data?: EntityNode;
6179
6312
  }>>;
6180
6313
  /**
6181
- * Detect behavioral patterns
6182
- * Run pattern detection algorithms to identify recurring behavioral patterns
6183
- * @param body - Request body
6314
+ * Get memories mentioning entity
6315
+ * Get all memories that mention a specific entity
6316
+ * @param id - The entity ID
6317
+ * @param limit - Maximum number of memories to return
6318
+ * @param offset - Number of memories to skip
6184
6319
  */
6185
- detectPatterns(options?: {
6186
- body?: {
6187
- contextFilter?: string;
6188
- timeframeStart?: string;
6189
- timeframeEnd?: string;
6190
- minConfidence?: number;
6191
- maxResults?: number;
6192
- autoStore?: boolean;
6193
- };
6320
+ getEntityMemories(id: string, options?: {
6321
+ limit?: number;
6322
+ offset?: number;
6194
6323
  }): Promise<HttpResponse<{
6195
6324
  data?: {
6196
- detectedPatterns?: Pattern[];
6325
+ memory?: Memory;
6326
+ confidence?: number;
6327
+ }[];
6328
+ pagination?: {
6329
+ limit?: number;
6330
+ offset?: number;
6197
6331
  count?: number;
6198
- stored?: number;
6199
- confidence?: {
6200
- average?: number;
6201
- highest?: number;
6202
- };
6203
6332
  };
6204
6333
  }>>;
6205
6334
  /**
6206
- * Analyze pattern trends
6207
- * Analyze pattern trends, correlations, and generate insights
6208
- * @param body - Request body
6335
+ * Get graph health metrics
6336
+ * Returns knowledge graph health metrics including entity counts, fact counts, topic counts, and extraction coverage
6209
6337
  */
6210
- analyzePatterns(options?: {
6211
- body?: {
6212
- timeRange?: number;
6213
- groupBy?: 'type' | 'context' | 'confidence';
6214
- includeDetails?: boolean;
6215
- };
6216
- }): Promise<HttpResponse<{
6338
+ getGraphHealth(): Promise<HttpResponse<{
6217
6339
  data?: {
6218
- analysis?: {
6219
- totalPatterns?: number;
6220
- recentPatterns?: number;
6221
- trends?: Record<string, unknown>;
6222
- insights?: string[];
6223
- recommendations?: string[];
6224
- };
6225
- timeRange?: number;
6226
- analyzedAt?: string;
6340
+ totalMemories?: number;
6341
+ totalEntities?: number;
6342
+ totalFacts?: number;
6343
+ totalTopics?: number;
6344
+ memoriesWithEntities?: number;
6345
+ entityCoverage?: number;
6227
6346
  };
6228
6347
  }>>;
6229
- /**
6230
- * Update pattern
6231
- * Update an existing pattern with partial data
6232
- * @param id - The pattern ID
6233
- * @param body - Request body
6234
- */
6235
- updatePattern(id: string, body: {
6236
- name?: string;
6237
- description?: string;
6238
- confidence?: number;
6239
- metadata?: Record<string, unknown>;
6240
- }): Promise<HttpResponse<{
6241
- data?: Pattern;
6242
- }>>;
6243
- /**
6244
- * Record pattern feedback
6245
- * Record feedback on a pattern
6246
- * @param body - Request body
6247
- */
6248
- recordPatternFeedback(body: {
6249
- patternId: string;
6250
- feedback: string;
6251
- }): Promise<HttpResponse<{
6252
- data?: Pattern;
6253
- }>>;
6254
6348
  }
6255
6349
 
6256
6350
  /**
6257
- * BehaviorService - Behavioral pattern tracking and state management endpoints API operations.
6351
+ * FactsService - Fact extraction and management endpoints API operations.
6258
6352
  * Auto-generated by sdk-generator - do not edit manually.
6259
6353
  */
6260
6354
 
6261
6355
  /**
6262
- * Behavioral pattern tracking and state management endpoints
6356
+ * Fact extraction and management endpoints
6263
6357
  */
6264
- declare class BehaviorService extends BaseService {
6358
+ declare class FactsService extends BaseService {
6265
6359
  /**
6266
- * Get behavioral state
6267
- * Get current behavioral state for the authenticated user
6360
+ * List facts
6361
+ * List all facts for the authenticated user
6362
+ * @param limit - Maximum number of facts to return
6363
+ * @param offset - Number of facts to skip
6364
+ * @param sortBy - Field to sort facts by
6365
+ * @param order - Sort order
6268
6366
  */
6269
- getBehavioralState(): Promise<HttpResponse<{
6270
- data?: Record<string, unknown>;
6367
+ listFacts(options?: {
6368
+ limit?: number;
6369
+ offset?: number;
6370
+ sortBy?: 'confidence' | 'createdAt';
6371
+ order?: 'asc' | 'desc';
6372
+ }): Promise<HttpResponse<{
6373
+ data?: Fact[];
6374
+ count?: number;
6271
6375
  }>>;
6272
6376
  /**
6273
- * Update behavioral state
6274
- * Update or mutate behavioral state
6377
+ * Create fact
6378
+ * Create a new semantic fact
6275
6379
  * @param body - Request body
6276
6380
  */
6277
- updateBehavioralState(options?: {
6278
- body?: {
6279
- state?: Record<string, unknown>;
6280
- mutations?: Record<string, unknown>;
6281
- };
6381
+ createFact(body: {
6382
+ subject: string;
6383
+ predicate: string;
6384
+ object: string;
6282
6385
  }): Promise<HttpResponse<{
6283
- data?: Record<string, unknown>;
6386
+ data?: Fact;
6284
6387
  }>>;
6285
- }
6286
-
6287
- /**
6288
- * NarrativesService - Narrative thread management endpoints API operations.
6289
- * Auto-generated by sdk-generator - do not edit manually.
6290
- */
6291
-
6292
- /**
6293
- * Narrative thread management endpoints
6294
- */
6295
- declare class NarrativesService extends BaseService {
6296
6388
  /**
6297
- * List narrative threads
6298
- * List all narrative threads for the authenticated user.
6299
- Narratives group related memories into coherent storylines.
6300
-
6301
- * @param limit - Maximum number of narratives to return
6302
- * @param offset - Number of narratives to skip
6303
- * @param state - Filter by narrative state
6304
- * @param topics - Comma-separated list of topics to filter by
6389
+ * Get fact by ID
6390
+ * Retrieve a specific fact by its ID
6391
+ * @param id - The fact ID
6305
6392
  */
6306
- listNarratives(options?: {
6307
- limit?: number;
6308
- offset?: number;
6309
- state?: 'open' | 'resolved' | 'reopened' | 'superseded';
6310
- topics?: string;
6311
- }): Promise<HttpResponse<{
6312
- data: NarrativeThread[];
6313
- pagination: {
6314
- limit: number;
6315
- offset: number;
6316
- count: number;
6317
- };
6393
+ getFactById(id: string): Promise<HttpResponse<{
6394
+ data?: Fact;
6318
6395
  }>>;
6319
6396
  /**
6320
- * Create a narrative thread
6321
- * Create a new narrative thread starting from a root memory.
6322
- Narratives help organize related memories into coherent storylines.
6323
-
6397
+ * Update fact
6398
+ * Update an existing fact completely
6399
+ * @param id - The fact ID
6324
6400
  * @param body - Request body
6325
6401
  */
6326
- createNarrative(body: {
6327
- title: string;
6328
- rootMemoryId: string;
6329
- topics?: string[];
6402
+ updateFact(id: string, body: {
6403
+ subject?: string;
6404
+ predicate?: string;
6405
+ object?: string;
6406
+ confidence?: number;
6330
6407
  }): Promise<HttpResponse<{
6331
- data: NarrativeThread;
6408
+ data?: Fact;
6332
6409
  }>>;
6333
6410
  /**
6334
- * Get a narrative thread
6335
- * Retrieve a specific narrative thread by ID
6336
- * @param id - The narrative ID
6411
+ * Delete fact
6412
+ * Delete a fact by its ID
6413
+ * @param id - The fact ID
6337
6414
  */
6338
- getNarrative(id: string): Promise<HttpResponse<{
6339
- data: NarrativeThread;
6340
- }>>;
6415
+ deleteFact(id: string): Promise<HttpResponse<void>>;
6341
6416
  /**
6342
- * Delete a narrative thread
6343
- * Delete a narrative thread.
6344
- This does not delete the associated memories, only the narrative structure.
6345
-
6346
- * @param id - The narrative ID
6417
+ * Search facts
6418
+ * Search semantic facts by query string
6419
+ * @param body - Request body
6347
6420
  */
6348
- deleteNarrative(id: string): Promise<HttpResponse<void>>;
6421
+ searchFacts(body: {
6422
+ query: string;
6423
+ limit?: number;
6424
+ }): Promise<HttpResponse<{
6425
+ data?: Fact[];
6426
+ count?: number;
6427
+ metadata?: {
6428
+ query?: string;
6429
+ };
6430
+ }>>;
6431
+ }
6432
+
6433
+ /**
6434
+ * GraphragService - Graph-based retrieval augmented generation endpoints API operations.
6435
+ * Auto-generated by sdk-generator - do not edit manually.
6436
+ */
6437
+
6438
+ /**
6439
+ * Graph-based retrieval augmented generation endpoints
6440
+ */
6441
+ declare class GraphragService extends BaseService {
6349
6442
  /**
6350
- * Update a narrative thread
6351
- * Update a narrative thread's title, topics, or state.
6352
- Use this to resolve, reopen, or modify narratives.
6353
-
6354
- * @param id - The narrative ID
6355
- * @param body - Request body
6443
+ * Explain a GraphRAG query
6444
+ * Get explanation for a previously executed GraphRAG query result
6445
+ * @param queryId - The query ID to explain
6356
6446
  */
6357
- updateNarrative(id: string, body: {
6358
- title?: string;
6359
- state?: 'open' | 'resolved' | 'reopened' | 'superseded';
6360
- resolutionMemoryId?: string;
6361
- topics?: string[];
6447
+ explainGraphRAGQuery(options?: {
6448
+ queryId?: string;
6362
6449
  }): Promise<HttpResponse<{
6363
- data: NarrativeThread;
6450
+ data?: Record<string, unknown>;
6364
6451
  }>>;
6365
6452
  /**
6366
- * Get narrative timeline
6367
- * Get all memories in a narrative, ordered by their position in the narrative.
6368
- Each memory includes its position and effective state.
6369
-
6370
- * @param id - The narrative ID
6371
- * @param limit - Maximum number of memories to return
6372
- * @param offset - Number of memories to skip
6453
+ * Query communities
6454
+ * Query communities for relevant information using semantic search
6455
+ * @param body - Request body
6373
6456
  */
6374
- getNarrativeTimeline(id: string, options?: {
6457
+ queryCommunities(body: {
6458
+ query: string;
6375
6459
  limit?: number;
6376
- offset?: number;
6377
6460
  }): Promise<HttpResponse<{
6378
- data: NarrativeMemory[];
6379
- narrative: NarrativeThread;
6380
- pagination: {
6381
- limit: number;
6382
- offset: number;
6383
- total: number;
6384
- };
6461
+ data?: Record<string, unknown>[];
6385
6462
  }>>;
6386
6463
  /**
6387
- * Add a memory to a narrative
6388
- * Add an existing memory to a narrative thread.
6389
- Optionally specify a position to insert the memory at.
6390
-
6391
- * @param id - The narrative ID
6464
+ * Execute a GraphRAG query
6465
+ * Execute a graph-based retrieval augmented generation query
6392
6466
  * @param body - Request body
6393
6467
  */
6394
- addMemoryToNarrative(id: string, body: {
6395
- memoryId: string;
6396
- position?: number;
6468
+ executeGraphRAGQuery(body: {
6469
+ query: string;
6470
+ maxDepth?: number;
6471
+ depth?: number;
6472
+ limit?: number;
6473
+ includeRelationships?: boolean;
6397
6474
  }): Promise<HttpResponse<{
6398
- data: NarrativeThread;
6475
+ data?: GraphRAGQueryResponse;
6399
6476
  }>>;
6477
+ }
6478
+
6479
+ /**
6480
+ * HealthService - Health check endpoints API operations.
6481
+ * Auto-generated by sdk-generator - do not edit manually.
6482
+ */
6483
+
6484
+ /**
6485
+ * Health check endpoints
6486
+ */
6487
+ declare class HealthService extends BaseService {
6400
6488
  /**
6401
- * Remove a memory from a narrative
6402
- * Remove a memory from a narrative thread.
6403
- This does not delete the memory itself, only removes it from the narrative.
6489
+ * API health check endpoint
6490
+ * Returns the health status and uptime of the API service.
6491
+ This endpoint is public and requires no authentication.
6492
+ Use this endpoint for monitoring, health checks, and service availability verification.
6493
+ Returns 200 when healthy, 503 when the database is unreachable.
6404
6494
 
6405
- * @param id - The narrative ID
6406
- * @param memoryId - The memory ID to remove
6407
6495
  */
6408
- removeMemoryFromNarrative(id: string, memoryId: string): Promise<HttpResponse<void>>;
6496
+ healthCheck(): Promise<HttpResponse<{
6497
+ status: 'healthy' | 'degraded' | 'unhealthy';
6498
+ timestamp: string;
6499
+ version: string;
6500
+ uptime: number;
6501
+ checks: Record<string, unknown>;
6502
+ }>>;
6409
6503
  }
6410
6504
 
6411
6505
  /**
6412
- * MonitoringService - Observability and metrics endpoints for production monitoring API operations.
6506
+ * InvitesService - Invite code validation and gate status endpoints API operations.
6413
6507
  * Auto-generated by sdk-generator - do not edit manually.
6414
6508
  */
6415
6509
 
6416
6510
  /**
6417
- * Observability and metrics endpoints for production monitoring
6511
+ * Invite code validation and gate status endpoints
6418
6512
  */
6419
- declare class MonitoringService extends BaseService {
6513
+ declare class InvitesService extends BaseService {
6420
6514
  /**
6421
- * Prometheus metrics endpoint
6422
- * Returns Prometheus-formatted metrics for monitoring and observability.
6423
- This endpoint is public and requires no authentication.
6424
- Designed to be scraped by Prometheus at regular intervals.
6515
+ * Check invite gate status
6516
+ * Check whether the invite gate is currently open or closed.
6517
+ When gated is true, new signups require a valid invite code.
6518
+ Response is cached server-side (30-second TTL).
6425
6519
 
6426
6520
  */
6427
- getMetrics(): Promise<HttpResponse<unknown>>;
6521
+ getGateStatus(): Promise<HttpResponse<{
6522
+ gated?: boolean;
6523
+ }>>;
6524
+ /**
6525
+ * Validate an invite code
6526
+ * Validate an invite code without redeeming it.
6527
+ Rate limited to 10 requests per minute per IP to prevent enumeration.
6528
+ Error messages are intentionally generic.
6529
+
6530
+ * @param body - Request body
6531
+ */
6532
+ validateInviteCode(body: {
6533
+ code: string;
6534
+ email: string;
6535
+ }): Promise<HttpResponse<{
6536
+ valid?: boolean;
6537
+ error?: string;
6538
+ }>>;
6428
6539
  }
6429
6540
 
6430
6541
  /**
@@ -7015,295 +7126,267 @@ declare class MemoriesService extends BaseService {
7015
7126
  }
7016
7127
 
7017
7128
  /**
7018
- * InvitesService - Invite code validation and gate status endpoints API operations.
7129
+ * MonitoringService - Observability and metrics endpoints for production monitoring API operations.
7019
7130
  * Auto-generated by sdk-generator - do not edit manually.
7020
7131
  */
7021
7132
 
7022
7133
  /**
7023
- * Invite code validation and gate status endpoints
7134
+ * Observability and metrics endpoints for production monitoring
7024
7135
  */
7025
- declare class InvitesService extends BaseService {
7026
- /**
7027
- * Check invite gate status
7028
- * Check whether the invite gate is currently open or closed.
7029
- When gated is true, new signups require a valid invite code.
7030
- Response is cached server-side (30-second TTL).
7031
-
7032
- */
7033
- getGateStatus(): Promise<HttpResponse<{
7034
- gated?: boolean;
7035
- }>>;
7136
+ declare class MonitoringService extends BaseService {
7036
7137
  /**
7037
- * Validate an invite code
7038
- * Validate an invite code without redeeming it.
7039
- Rate limited to 10 requests per minute per IP to prevent enumeration.
7040
- Error messages are intentionally generic.
7138
+ * Prometheus metrics endpoint
7139
+ * Returns Prometheus-formatted metrics for monitoring and observability.
7140
+ This endpoint is public and requires no authentication.
7141
+ Designed to be scraped by Prometheus at regular intervals.
7041
7142
 
7042
- * @param body - Request body
7043
7143
  */
7044
- validateInviteCode(body: {
7045
- code: string;
7046
- email: string;
7047
- }): Promise<HttpResponse<{
7048
- valid?: boolean;
7049
- error?: string;
7050
- }>>;
7144
+ getMetrics(): Promise<HttpResponse<unknown>>;
7051
7145
  }
7052
7146
 
7053
7147
  /**
7054
- * HealthService - Health check endpoints API operations.
7148
+ * NarrativesService - Narrative thread management endpoints API operations.
7055
7149
  * Auto-generated by sdk-generator - do not edit manually.
7056
7150
  */
7057
7151
 
7058
7152
  /**
7059
- * Health check endpoints
7153
+ * Narrative thread management endpoints
7060
7154
  */
7061
- declare class HealthService extends BaseService {
7155
+ declare class NarrativesService extends BaseService {
7062
7156
  /**
7063
- * API health check endpoint
7064
- * Returns the health status and uptime of the API service.
7065
- This endpoint is public and requires no authentication.
7066
- Use this endpoint for monitoring, health checks, and service availability verification.
7067
- Returns 200 when healthy, 503 when the database is unreachable.
7157
+ * List narrative threads
7158
+ * List all narrative threads for the authenticated user.
7159
+ Narratives group related memories into coherent storylines.
7068
7160
 
7161
+ * @param limit - Maximum number of narratives to return
7162
+ * @param offset - Number of narratives to skip
7163
+ * @param state - Filter by narrative state
7164
+ * @param topics - Comma-separated list of topics to filter by
7069
7165
  */
7070
- healthCheck(): Promise<HttpResponse<{
7071
- status: 'healthy' | 'degraded' | 'unhealthy';
7072
- timestamp: string;
7073
- version: string;
7074
- uptime: number;
7075
- checks: Record<string, unknown>;
7076
- }>>;
7077
- }
7078
-
7079
- /**
7080
- * GraphragService - Graph-based retrieval augmented generation endpoints API operations.
7081
- * Auto-generated by sdk-generator - do not edit manually.
7082
- */
7083
-
7084
- /**
7085
- * Graph-based retrieval augmented generation endpoints
7086
- */
7087
- declare class GraphragService extends BaseService {
7088
- /**
7089
- * Explain a GraphRAG query
7090
- * Get explanation for a previously executed GraphRAG query result
7091
- * @param queryId - The query ID to explain
7092
- */
7093
- explainGraphRAGQuery(options?: {
7094
- queryId?: string;
7166
+ listNarratives(options?: {
7167
+ limit?: number;
7168
+ offset?: number;
7169
+ state?: 'open' | 'resolved' | 'reopened' | 'superseded';
7170
+ topics?: string;
7095
7171
  }): Promise<HttpResponse<{
7096
- data?: Record<string, unknown>;
7172
+ data: NarrativeThread[];
7173
+ pagination: {
7174
+ limit: number;
7175
+ offset: number;
7176
+ count: number;
7177
+ };
7097
7178
  }>>;
7098
7179
  /**
7099
- * Query communities
7100
- * Query communities for relevant information using semantic search
7180
+ * Create a narrative thread
7181
+ * Create a new narrative thread starting from a root memory.
7182
+ Narratives help organize related memories into coherent storylines.
7183
+
7101
7184
  * @param body - Request body
7102
7185
  */
7103
- queryCommunities(body: {
7104
- query: string;
7105
- limit?: number;
7186
+ createNarrative(body: {
7187
+ title: string;
7188
+ rootMemoryId: string;
7189
+ topics?: string[];
7106
7190
  }): Promise<HttpResponse<{
7107
- data?: Record<string, unknown>[];
7191
+ data: NarrativeThread;
7108
7192
  }>>;
7109
7193
  /**
7110
- * Execute a GraphRAG query
7111
- * Execute a graph-based retrieval augmented generation query
7112
- * @param body - Request body
7194
+ * Get a narrative thread
7195
+ * Retrieve a specific narrative thread by ID
7196
+ * @param id - The narrative ID
7113
7197
  */
7114
- executeGraphRAGQuery(body: {
7115
- query: string;
7116
- maxDepth?: number;
7117
- depth?: number;
7118
- limit?: number;
7119
- includeRelationships?: boolean;
7120
- }): Promise<HttpResponse<{
7121
- data?: GraphRAGQueryResponse;
7198
+ getNarrative(id: string): Promise<HttpResponse<{
7199
+ data: NarrativeThread;
7122
7200
  }>>;
7123
- }
7124
-
7125
- /**
7126
- * FactsService - Fact extraction and management endpoints API operations.
7127
- * Auto-generated by sdk-generator - do not edit manually.
7128
- */
7129
-
7130
- /**
7131
- * Fact extraction and management endpoints
7132
- */
7133
- declare class FactsService extends BaseService {
7134
7201
  /**
7135
- * List facts
7136
- * List all facts for the authenticated user
7137
- * @param limit - Maximum number of facts to return
7138
- * @param offset - Number of facts to skip
7139
- * @param sortBy - Field to sort facts by
7140
- * @param order - Sort order
7202
+ * Delete a narrative thread
7203
+ * Delete a narrative thread.
7204
+ This does not delete the associated memories, only the narrative structure.
7205
+
7206
+ * @param id - The narrative ID
7141
7207
  */
7142
- listFacts(options?: {
7143
- limit?: number;
7144
- offset?: number;
7145
- sortBy?: 'confidence' | 'createdAt';
7146
- order?: 'asc' | 'desc';
7147
- }): Promise<HttpResponse<{
7148
- data?: Fact[];
7149
- count?: number;
7150
- }>>;
7208
+ deleteNarrative(id: string): Promise<HttpResponse<void>>;
7151
7209
  /**
7152
- * Create fact
7153
- * Create a new semantic fact
7210
+ * Update a narrative thread
7211
+ * Update a narrative thread's title, topics, or state.
7212
+ Use this to resolve, reopen, or modify narratives.
7213
+
7214
+ * @param id - The narrative ID
7154
7215
  * @param body - Request body
7155
7216
  */
7156
- createFact(body: {
7157
- subject: string;
7158
- predicate: string;
7159
- object: string;
7217
+ updateNarrative(id: string, body: {
7218
+ title?: string;
7219
+ state?: 'open' | 'resolved' | 'reopened' | 'superseded';
7220
+ resolutionMemoryId?: string;
7221
+ topics?: string[];
7160
7222
  }): Promise<HttpResponse<{
7161
- data?: Fact;
7223
+ data: NarrativeThread;
7162
7224
  }>>;
7163
7225
  /**
7164
- * Get fact by ID
7165
- * Retrieve a specific fact by its ID
7166
- * @param id - The fact ID
7226
+ * Get narrative timeline
7227
+ * Get all memories in a narrative, ordered by their position in the narrative.
7228
+ Each memory includes its position and effective state.
7229
+
7230
+ * @param id - The narrative ID
7231
+ * @param limit - Maximum number of memories to return
7232
+ * @param offset - Number of memories to skip
7167
7233
  */
7168
- getFactById(id: string): Promise<HttpResponse<{
7169
- data?: Fact;
7234
+ getNarrativeTimeline(id: string, options?: {
7235
+ limit?: number;
7236
+ offset?: number;
7237
+ }): Promise<HttpResponse<{
7238
+ data: NarrativeMemory[];
7239
+ narrative: NarrativeThread;
7240
+ pagination: {
7241
+ limit: number;
7242
+ offset: number;
7243
+ total: number;
7244
+ };
7170
7245
  }>>;
7171
7246
  /**
7172
- * Update fact
7173
- * Update an existing fact completely
7174
- * @param id - The fact ID
7247
+ * Add a memory to a narrative
7248
+ * Add an existing memory to a narrative thread.
7249
+ Optionally specify a position to insert the memory at.
7250
+
7251
+ * @param id - The narrative ID
7175
7252
  * @param body - Request body
7176
7253
  */
7177
- updateFact(id: string, body: {
7178
- subject?: string;
7179
- predicate?: string;
7180
- object?: string;
7181
- confidence?: number;
7254
+ addMemoryToNarrative(id: string, body: {
7255
+ memoryId: string;
7256
+ position?: number;
7182
7257
  }): Promise<HttpResponse<{
7183
- data?: Fact;
7258
+ data: NarrativeThread;
7184
7259
  }>>;
7185
7260
  /**
7186
- * Delete fact
7187
- * Delete a fact by its ID
7188
- * @param id - The fact ID
7189
- */
7190
- deleteFact(id: string): Promise<HttpResponse<void>>;
7191
- /**
7192
- * Search facts
7193
- * Search semantic facts by query string
7194
- * @param body - Request body
7261
+ * Remove a memory from a narrative
7262
+ * Remove a memory from a narrative thread.
7263
+ This does not delete the memory itself, only removes it from the narrative.
7264
+
7265
+ * @param id - The narrative ID
7266
+ * @param memoryId - The memory ID to remove
7195
7267
  */
7196
- searchFacts(body: {
7197
- query: string;
7198
- limit?: number;
7199
- }): Promise<HttpResponse<{
7200
- data?: Fact[];
7201
- count?: number;
7202
- metadata?: {
7203
- query?: string;
7204
- };
7205
- }>>;
7268
+ removeMemoryFromNarrative(id: string, memoryId: string): Promise<HttpResponse<void>>;
7206
7269
  }
7207
7270
 
7208
7271
  /**
7209
- * EntitiesService - Entity extraction and discovery endpoints API operations.
7272
+ * SystemService - System health, monitoring, and configuration endpoints API operations.
7210
7273
  * Auto-generated by sdk-generator - do not edit manually.
7211
7274
  */
7212
7275
 
7213
7276
  /**
7214
- * Entity extraction and discovery endpoints
7277
+ * System health, monitoring, and configuration endpoints
7215
7278
  */
7216
- declare class EntitiesService extends BaseService {
7279
+ declare class SystemService extends BaseService {
7217
7280
  /**
7218
- * List entities
7219
- * List all entities for the authenticated user, optionally filtered by type
7220
- * @param type - Filter by entity type (e.g., PERSON, TECHNOLOGY)
7221
- * @param limit - Maximum number of entities to return
7222
- * @param offset - Number of entities to skip
7281
+ * Get OpenAPI specification
7282
+ * Returns the OpenAPI 3.x specification for the entire API. This endpoint is used by CI/CD to sync the API Gateway.
7283
+ * @param noCache - Bypass cache and regenerate specification
7223
7284
  */
7224
- listEntities(options?: {
7225
- type?: string;
7226
- limit?: number;
7227
- offset?: number;
7228
- }): Promise<HttpResponse<{
7229
- data?: EntityNode[];
7230
- pagination?: {
7231
- limit?: number;
7232
- offset?: number;
7233
- count?: number;
7285
+ getOpenApiSpec(options?: {
7286
+ noCache?: '1' | 'true';
7287
+ }): Promise<HttpResponse<Record<string, unknown>>>;
7288
+ /**
7289
+ * Get system health status
7290
+ * Get the current health status of the system including database connectivity
7291
+ */
7292
+ getSystemHealth(): Promise<HttpResponse<{
7293
+ data?: {
7294
+ status?: 'healthy' | 'unhealthy';
7295
+ database?: Record<string, unknown>;
7296
+ uptime?: number;
7234
7297
  };
7235
7298
  }>>;
7236
7299
  /**
7237
- * Get entity by ID
7238
- * Retrieve a specific entity by its ID
7239
- * @param id - The entity ID
7300
+ * Get context status
7301
+ * Get database statistics and context information
7240
7302
  */
7241
- getEntityById(id: string): Promise<HttpResponse<{
7242
- data?: EntityNode;
7303
+ getContextStatus(): Promise<HttpResponse<{
7304
+ data?: Record<string, unknown>;
7243
7305
  }>>;
7244
7306
  /**
7245
- * Get memories mentioning entity
7246
- * Get all memories that mention a specific entity
7247
- * @param id - The entity ID
7248
- * @param limit - Maximum number of memories to return
7249
- * @param offset - Number of memories to skip
7307
+ * Get feature flags
7308
+ * Get all feature flags for the authenticated user
7250
7309
  */
7251
- getEntityMemories(id: string, options?: {
7252
- limit?: number;
7253
- offset?: number;
7310
+ getFeatureFlags(): Promise<HttpResponse<{
7311
+ data?: Record<string, unknown>;
7312
+ }>>;
7313
+ /**
7314
+ * Evaluate feature flag
7315
+ * Evaluate a specific feature flag for the authenticated user
7316
+ * @param body - Request body
7317
+ */
7318
+ evaluateFeatureFlag(body: {
7319
+ flagName: string;
7320
+ context?: Record<string, unknown>;
7254
7321
  }): Promise<HttpResponse<{
7255
7322
  data?: {
7256
- memory?: Memory;
7257
- confidence?: number;
7258
- }[];
7259
- pagination?: {
7260
- limit?: number;
7261
- offset?: number;
7262
- count?: number;
7323
+ enabled?: boolean;
7324
+ flagName?: string;
7263
7325
  };
7264
7326
  }>>;
7265
7327
  /**
7266
- * Get graph health metrics
7267
- * Returns knowledge graph health metrics including entity counts, fact counts, topic counts, and extraction coverage
7328
+ * Analyze memory quality distribution
7329
+ * Analyze the quality distribution of memories for the authenticated user
7330
+ * @param includeDetails - Include detailed pruning candidate information
7331
+ * @param minQualityThreshold - Minimum quality threshold for pruning candidates (default 0.4)
7268
7332
  */
7269
- getGraphHealth(): Promise<HttpResponse<{
7333
+ analyzeMemoryQuality(options?: {
7334
+ includeDetails?: boolean;
7335
+ minQualityThreshold?: number;
7336
+ }): Promise<HttpResponse<{
7270
7337
  data?: {
7271
7338
  totalMemories?: number;
7272
- totalEntities?: number;
7273
- totalFacts?: number;
7274
- totalTopics?: number;
7275
- memoriesWithEntities?: number;
7276
- entityCoverage?: number;
7339
+ qualityDistribution?: {
7340
+ high?: number;
7341
+ medium?: number;
7342
+ low?: number;
7343
+ };
7344
+ averageQuality?: number;
7345
+ pruningCandidates?: number;
7346
+ };
7347
+ }>>;
7348
+ /**
7349
+ * Prune low-quality memories
7350
+ * Prune (soft delete) low-quality memories for the authenticated user
7351
+ * @param body - Request body
7352
+ */
7353
+ pruneMemories(options?: {
7354
+ body?: {
7355
+ targetReduction?: number;
7356
+ minQualityThreshold?: number;
7357
+ preserveRecent?: boolean;
7358
+ recentDaysToPreserve?: number;
7359
+ dryRun?: boolean;
7360
+ };
7361
+ }): Promise<HttpResponse<{
7362
+ data?: {
7363
+ prunedCount?: number;
7364
+ prunedIds?: string[];
7365
+ dryRun?: boolean;
7277
7366
  };
7278
7367
  }>>;
7279
7368
  }
7280
7369
 
7281
7370
  /**
7282
- * ConversationsService - Conversation tracking and analysis endpoints API operations.
7371
+ * PatternsService - Pattern detection and behavioral analysis endpoints API operations.
7283
7372
  * Auto-generated by sdk-generator - do not edit manually.
7284
7373
  */
7285
7374
 
7286
7375
  /**
7287
- * Conversation tracking and analysis endpoints
7376
+ * Pattern detection and behavioral analysis endpoints
7288
7377
  */
7289
- declare class ConversationsService extends BaseService {
7378
+ declare class PatternsService extends BaseService {
7290
7379
  /**
7291
- * List conversations
7292
- * List all conversations for the authenticated user with pagination
7293
- * @param limit - Maximum number of conversations to return
7294
- * @param offset - Number of conversations to skip
7295
- * @param since - Return only conversations created after this timestamp (ISO 8601 format)
7296
- * @param sortBy - Field to sort conversations by
7297
- * @param order - Sort order
7380
+ * List patterns
7381
+ * List all patterns for the authenticated user
7382
+ * @param limit - Maximum number of patterns to return
7383
+ * @param offset - Number of patterns to skip
7298
7384
  */
7299
- listConversations(options?: {
7385
+ listPatterns(options?: {
7300
7386
  limit?: number;
7301
7387
  offset?: number;
7302
- since?: string;
7303
- sortBy?: 'lastActivityAt' | 'createdAt' | 'memoryCount';
7304
- order?: 'asc' | 'desc';
7305
7388
  }): Promise<HttpResponse<{
7306
- data?: Conversation[];
7389
+ data?: Pattern[];
7307
7390
  pagination?: {
7308
7391
  limit?: number;
7309
7392
  offset?: number;
@@ -7311,427 +7394,376 @@ declare class ConversationsService extends BaseService {
7311
7394
  };
7312
7395
  }>>;
7313
7396
  /**
7314
- * Create conversation
7315
- * Create a new conversation for the authenticated user
7316
- * @param body - Request body
7317
- */
7318
- createConversation(body: {
7319
- title: string;
7320
- summary?: string;
7321
- }): Promise<HttpResponse<{
7322
- data?: Conversation;
7323
- }>>;
7324
- /**
7325
- * Get conversation summary
7326
- * Retrieve a conversation summary by its ID
7327
- * @param conversationId - The conversation ID
7328
- */
7329
- getConversationSummary(conversationId: string): Promise<HttpResponse<{
7330
- data?: Conversation;
7331
- }>>;
7332
- /**
7333
- * Delete conversation
7334
- * Delete a conversation and soft-delete all associated memories
7335
- * @param conversationId - The conversation ID
7336
- */
7337
- deleteConversation(conversationId: string): Promise<HttpResponse<void>>;
7338
- /**
7339
- * Get conversation timeline
7340
- * Get all memories in a conversation in chronological order
7341
- * @param conversationId - The conversation ID
7342
- */
7343
- getConversationTimeline(conversationId: string): Promise<HttpResponse<{
7344
- data?: Memory[];
7345
- count?: number;
7346
- }>>;
7347
- /**
7348
- * Search conversations
7349
- * Search conversations by query string
7397
+ * Compile patterns
7398
+ * Compile patterns from user's memories
7350
7399
  * @param body - Request body
7351
7400
  */
7352
- searchConversations(body: {
7353
- query: string;
7354
- limit?: number;
7401
+ compilePatterns(options?: {
7402
+ body?: {
7403
+ minOccurrences?: number;
7404
+ timeWindow?: string;
7405
+ };
7355
7406
  }): Promise<HttpResponse<{
7356
- data?: Conversation[];
7407
+ data?: Pattern[];
7357
7408
  count?: number;
7358
7409
  }>>;
7359
7410
  /**
7360
- * Find conversations by topic
7361
- * Find conversations that contain a specific topic
7411
+ * Detect behavioral patterns
7412
+ * Run pattern detection algorithms to identify recurring behavioral patterns
7362
7413
  * @param body - Request body
7363
7414
  */
7364
- findConversationsByTopic(body: {
7365
- topicId: string;
7366
- limit?: number;
7367
- }): Promise<HttpResponse<{
7368
- data?: Conversation[];
7369
- count?: number;
7370
- metadata?: {
7371
- topicId?: string;
7415
+ detectPatterns(options?: {
7416
+ body?: {
7417
+ contextFilter?: string;
7418
+ timeframeStart?: string;
7419
+ timeframeEnd?: string;
7420
+ minConfidence?: number;
7421
+ maxResults?: number;
7422
+ autoStore?: boolean;
7372
7423
  };
7373
- }>>;
7374
- }
7375
-
7376
- /**
7377
- * BillingService - Subscription billing and payment management endpoints API operations.
7378
- * Auto-generated by sdk-generator - do not edit manually.
7379
- */
7380
-
7381
- /**
7382
- * Subscription billing and payment management endpoints
7383
- */
7384
- declare class BillingService extends BaseService {
7385
- /**
7386
- * Get billing overview
7387
- * Get subscription, payment method, and upcoming invoice information
7388
- */
7389
- getBillingOverview(): Promise<HttpResponse<{
7390
- data?: BillingOverview;
7391
- }>>;
7392
- /**
7393
- * Create checkout session
7394
- * Create a Stripe checkout session for subscription upgrade
7395
- * @param body - Request body
7396
- */
7397
- createCheckoutSession(body: {
7398
- priceId?: string;
7399
- successUrl: string;
7400
- cancelUrl: string;
7401
7424
  }): Promise<HttpResponse<{
7402
- data?: CheckoutSessionResponse;
7403
- }>>;
7404
- /**
7405
- * Create billing portal session
7406
- * Create a Stripe billing portal session for managing subscription
7407
- * @param body - Request body
7408
- */
7409
- createPortalSession(body: {
7410
- returnUrl: string;
7411
- }): Promise<HttpResponse<{
7412
- data?: PortalSessionResponse;
7413
- }>>;
7414
- /**
7415
- * Get current subscription
7416
- * Get the current subscription details for the authenticated user
7417
- */
7418
- getSubscription(): Promise<HttpResponse<{
7419
- data?: Subscription;
7425
+ data?: {
7426
+ detectedPatterns?: Pattern[];
7427
+ count?: number;
7428
+ stored?: number;
7429
+ confidence?: {
7430
+ average?: number;
7431
+ highest?: number;
7432
+ };
7433
+ };
7420
7434
  }>>;
7421
7435
  /**
7422
- * Cancel subscription
7423
- * Cancel the current subscription at the end of the billing period
7436
+ * Analyze pattern trends
7437
+ * Analyze pattern trends, correlations, and generate insights
7424
7438
  * @param body - Request body
7425
7439
  */
7426
- cancelSubscription(options?: {
7427
- body?: Record<string, unknown>;
7440
+ analyzePatterns(options?: {
7441
+ body?: {
7442
+ timeRange?: number;
7443
+ groupBy?: 'type' | 'context' | 'confidence';
7444
+ includeDetails?: boolean;
7445
+ };
7428
7446
  }): Promise<HttpResponse<{
7429
- data?: Subscription;
7447
+ data?: {
7448
+ analysis?: {
7449
+ totalPatterns?: number;
7450
+ recentPatterns?: number;
7451
+ trends?: Record<string, unknown>;
7452
+ insights?: string[];
7453
+ recommendations?: string[];
7454
+ };
7455
+ timeRange?: number;
7456
+ analyzedAt?: string;
7457
+ };
7430
7458
  }>>;
7431
7459
  /**
7432
- * Reactivate subscription
7433
- * Reactivate a subscription that was scheduled for cancellation
7460
+ * Update pattern
7461
+ * Update an existing pattern with partial data
7462
+ * @param id - The pattern ID
7434
7463
  * @param body - Request body
7435
7464
  */
7436
- reactivateSubscription(options?: {
7437
- body?: Record<string, unknown>;
7465
+ updatePattern(id: string, body: {
7466
+ name?: string;
7467
+ description?: string;
7468
+ confidence?: number;
7469
+ metadata?: Record<string, unknown>;
7438
7470
  }): Promise<HttpResponse<{
7439
- data?: Subscription;
7471
+ data?: Pattern;
7440
7472
  }>>;
7441
7473
  /**
7442
- * List invoices
7443
- * Get a list of invoices for the authenticated user
7444
- * @param limit - Maximum number of invoices to return
7474
+ * Record pattern feedback
7475
+ * Record feedback on a pattern
7476
+ * @param body - Request body
7445
7477
  */
7446
- listInvoices(options?: {
7447
- limit?: number;
7478
+ recordPatternFeedback(body: {
7479
+ patternId: string;
7480
+ feedback: string;
7448
7481
  }): Promise<HttpResponse<{
7449
- data?: ListInvoicesResponse;
7482
+ data?: Pattern;
7450
7483
  }>>;
7484
+ }
7485
+
7486
+ /**
7487
+ * BehaviorService - Behavioral pattern tracking and state management endpoints API operations.
7488
+ * Auto-generated by sdk-generator - do not edit manually.
7489
+ */
7490
+
7491
+ /**
7492
+ * Behavioral pattern tracking and state management endpoints
7493
+ */
7494
+ declare class BehaviorService extends BaseService {
7451
7495
  /**
7452
- * List payment methods
7453
- * Get a list of payment methods for the authenticated user
7496
+ * Get behavioral state
7497
+ * Get current behavioral state for the authenticated user
7454
7498
  */
7455
- listPaymentMethods(): Promise<HttpResponse<{
7456
- data?: ListPaymentMethodsResponse;
7499
+ getBehavioralState(): Promise<HttpResponse<{
7500
+ data?: Record<string, unknown>;
7457
7501
  }>>;
7458
7502
  /**
7459
- * Set default payment method
7460
- * Set a payment method as the default for future payments
7461
- * @param id - The payment method ID
7503
+ * Update behavioral state
7504
+ * Update or mutate behavioral state
7462
7505
  * @param body - Request body
7463
7506
  */
7464
- setDefaultPaymentMethod(id: string, options?: {
7465
- body?: Record<string, unknown>;
7507
+ updateBehavioralState(options?: {
7508
+ body?: {
7509
+ state?: Record<string, unknown>;
7510
+ mutations?: Record<string, unknown>;
7511
+ };
7466
7512
  }): Promise<HttpResponse<{
7467
- message?: string;
7468
- }>>;
7469
- /**
7470
- * Delete payment method
7471
- * Remove a payment method from the account
7472
- * @param id - The payment method ID
7473
- */
7474
- deletePaymentMethod(id: string): Promise<HttpResponse<void>>;
7475
- /**
7476
- * Stripe webhook endpoint
7477
- * Receive and process Stripe webhook events
7478
- * @param body - Request body
7479
- */
7480
- stripeWebhook(body: Record<string, unknown>): Promise<HttpResponse<{
7481
- received?: boolean;
7513
+ data?: Record<string, unknown>;
7482
7514
  }>>;
7483
7515
  }
7484
7516
 
7485
7517
  /**
7486
- * ArtifactsService - Artifact storage and retrieval endpoints API operations.
7518
+ * TopicsService - Topic detection, clustering, and management endpoints API operations.
7487
7519
  * Auto-generated by sdk-generator - do not edit manually.
7488
7520
  */
7489
7521
 
7490
7522
  /**
7491
- * Artifact storage and retrieval endpoints
7523
+ * Topic detection, clustering, and management endpoints
7492
7524
  */
7493
- declare class ArtifactsService extends BaseService {
7525
+ declare class TopicsService extends BaseService {
7494
7526
  /**
7495
- * List artifacts
7496
- * List all artifacts for the authenticated user with optional filters
7497
- * @param limit - Maximum number of artifacts to return
7498
- * @param offset - Number of artifacts to skip
7499
- * @param memoryId - Filter by memory ID
7500
- * @param conversationId - Filter by conversation ID
7501
- * @param type - Filter by artifact type
7527
+ * List topics
7528
+ * List all topics with pagination
7529
+ * @param limit - Maximum number of topics to return
7530
+ * @param offset - Number of topics to skip
7531
+ * @param sortBy - Field to sort topics by
7532
+ * @param order - Sort order
7502
7533
  */
7503
- listArtifacts(options?: {
7534
+ listTopics(options?: {
7504
7535
  limit?: number;
7505
7536
  offset?: number;
7506
- memoryId?: string;
7507
- conversationId?: string;
7508
- type?: string;
7537
+ sortBy?: 'name' | 'memoryCount';
7538
+ order?: 'asc' | 'desc';
7509
7539
  }): Promise<HttpResponse<{
7510
- data?: Artifact[];
7511
- count?: number;
7540
+ data?: Topic[];
7541
+ pagination?: {
7542
+ limit?: number;
7543
+ offset?: number;
7544
+ count?: number;
7545
+ };
7512
7546
  }>>;
7513
7547
  /**
7514
- * Create artifact
7515
- * Create a new artifact for the authenticated user
7516
- * @param body - Request body
7548
+ * Get topic by ID
7549
+ * Retrieve a specific topic by its ID
7550
+ * @param id - The topic ID
7517
7551
  */
7518
- createArtifact(body: {
7519
- content: string;
7520
- type: string;
7521
- name?: string;
7522
- description?: string;
7523
- memoryId?: string;
7524
- conversationId?: string;
7525
- metadata?: Record<string, unknown>;
7526
- }): Promise<HttpResponse<{
7527
- data?: Artifact;
7552
+ getTopicById(id: string): Promise<HttpResponse<{
7553
+ data?: Topic;
7528
7554
  }>>;
7529
7555
  /**
7530
- * Get artifact by ID
7531
- * Retrieve a specific artifact by its ID
7532
- * @param id - The artifact ID
7556
+ * Merge topics
7557
+ * Merge two topics into one
7558
+ * @param body - Request body
7533
7559
  */
7534
- getArtifactById(id: string): Promise<HttpResponse<{
7535
- data?: Artifact;
7560
+ mergeTopics(body: {
7561
+ sourceTopicId: string;
7562
+ targetTopicId: string;
7563
+ }): Promise<HttpResponse<{
7564
+ data?: Topic;
7536
7565
  }>>;
7537
7566
  /**
7538
- * Delete artifact
7539
- * Delete an artifact by its ID
7540
- * @param id - The artifact ID
7567
+ * Discover related topics
7568
+ * Discover topics related to a given topic
7569
+ * @param body - Request body
7541
7570
  */
7542
- deleteArtifact(id: string): Promise<HttpResponse<void>>;
7571
+ discoverRelatedTopics(body: {
7572
+ topicId: string;
7573
+ limit?: number;
7574
+ }): Promise<HttpResponse<{
7575
+ data?: Topic[];
7576
+ }>>;
7543
7577
  /**
7544
- * Update artifact
7545
- * Update an existing artifact with partial data
7546
- * @param id - The artifact ID
7578
+ * Calculate topic similarity
7579
+ * Calculate similarity score between two topics
7547
7580
  * @param body - Request body
7548
7581
  */
7549
- updateArtifact(id: string, body: {
7550
- content?: string;
7551
- type?: string;
7552
- name?: string;
7553
- description?: string;
7554
- metadata?: Record<string, unknown>;
7582
+ calculateTopicSimilarity(body: {
7583
+ topicId1: string;
7584
+ topicId2: string;
7555
7585
  }): Promise<HttpResponse<{
7556
- data?: Artifact;
7586
+ data?: {
7587
+ similarity?: number;
7588
+ };
7557
7589
  }>>;
7558
- }
7559
-
7560
- /**
7561
- * ApiKeysService - API key management endpoints API operations.
7562
- * Auto-generated by sdk-generator - do not edit manually.
7563
- */
7564
-
7565
- /**
7566
- * API key management endpoints
7567
- */
7568
- declare class ApiKeysService extends BaseService {
7569
7590
  /**
7570
- * Get user information for current API key
7571
- * Debug endpoint to retrieve user ID and authentication method from the current API key
7591
+ * Find similar topics
7592
+ * Find topics similar to a given topic
7593
+ * @param body - Request body
7572
7594
  */
7573
- debugUser(): Promise<HttpResponse<{
7595
+ findSimilarTopics(body: {
7596
+ topicId: string;
7597
+ threshold?: number;
7598
+ limit?: number;
7599
+ }): Promise<HttpResponse<{
7574
7600
  data?: {
7575
- userId?: string;
7576
- authMethod?: string;
7577
- };
7601
+ topic?: Topic;
7602
+ similarity?: number;
7603
+ }[];
7578
7604
  }>>;
7579
7605
  /**
7580
- * List API keys
7581
- * List all API keys for the authenticated user
7606
+ * Cluster topics
7607
+ * Cluster topics using community detection algorithms
7608
+ * @param body - Request body
7582
7609
  */
7583
- listApiKeys(): Promise<HttpResponse<{
7584
- data?: ApiKey[];
7610
+ clusterTopics(options?: {
7611
+ body?: {
7612
+ minClusterSize?: number;
7613
+ };
7614
+ }): Promise<HttpResponse<{
7615
+ data?: {
7616
+ clusters?: Record<string, unknown>[];
7617
+ clusterCount?: number;
7618
+ };
7585
7619
  }>>;
7586
7620
  /**
7587
- * Create API key
7588
- * Create a new API key for the authenticated user
7621
+ * Detect communities
7622
+ * Detect communities in the topic graph using specified algorithm
7589
7623
  * @param body - Request body
7590
7624
  */
7591
- createApiKey(options?: {
7625
+ detectCommunities(options?: {
7592
7626
  body?: {
7593
- label?: string;
7594
- expiresAt?: string;
7627
+ algorithm?: string;
7595
7628
  };
7596
7629
  }): Promise<HttpResponse<{
7597
7630
  data?: {
7598
- apiKey?: string;
7599
- keyInfo?: ApiKey;
7631
+ communities?: Community[];
7632
+ communityCount?: number;
7600
7633
  };
7601
7634
  }>>;
7602
7635
  /**
7603
- * Delete API key
7604
- * Delete (revoke) an API key by its ID
7605
- * @param id - The API key ID
7636
+ * Search topics
7637
+ * Search topics by query string using fulltext search
7638
+ * @param body - Request body
7606
7639
  */
7607
- deleteApiKey(id: string): Promise<HttpResponse<void>>;
7640
+ searchTopics(body: {
7641
+ query: string;
7642
+ limit?: number;
7643
+ offset?: number;
7644
+ }): Promise<HttpResponse<{
7645
+ data?: Record<string, unknown>[];
7646
+ total?: number;
7647
+ limit?: number;
7648
+ offset?: number;
7649
+ }>>;
7608
7650
  }
7609
7651
 
7610
7652
  /**
7611
- * AdminService - Admin management endpoints for invite codes and platform configuration API operations.
7653
+ * UsersService - User management and profile endpoints API operations.
7612
7654
  * Auto-generated by sdk-generator - do not edit manually.
7613
7655
  */
7614
7656
 
7615
7657
  /**
7616
- * Admin management endpoints for invite codes and platform configuration
7658
+ * User management and profile endpoints
7617
7659
  */
7618
- declare class AdminService extends BaseService {
7619
- /**
7620
- * List invite codes
7621
- * List all invite codes with optional status filter
7622
- * @param status - Filter by status
7623
- * @param limit -
7624
- * @param offset -
7625
- */
7626
- adminListInviteCodes(options?: {
7627
- status?: 'active' | 'exhausted' | 'revoked' | 'expired';
7628
- limit?: number;
7629
- offset?: number;
7630
- }): Promise<HttpResponse<{
7631
- invites?: {
7632
- id?: string;
7633
- code?: string;
7634
- email?: string;
7635
- label?: string;
7636
- maxUses?: number;
7637
- currentUses?: number;
7638
- status?: string;
7639
- expiresAt?: string;
7640
- createdAt?: string;
7641
- }[];
7642
- total?: number;
7643
- }>>;
7660
+ declare class UsersService extends BaseService {
7644
7661
  /**
7645
- * Create invite code
7646
- * Create a new invite code for the gated preview
7662
+ * Sync user from WorkOS
7663
+ * Called by the customer portal after WorkOS authentication.
7664
+ Creates a new user if they don't exist, or updates their profile if they do.
7665
+ This is the main entry point for user provisioning.
7666
+ When the invite gate is closed and a new user is created, the inviteCode
7667
+ is redeemed atomically to track which code was used for registration.
7668
+
7647
7669
  * @param body - Request body
7648
7670
  */
7649
- adminCreateInviteCode(body: {
7671
+ syncUser(body: {
7672
+ workosId: string;
7650
7673
  email: string;
7651
- label: string;
7652
- maxUses?: number;
7653
- code?: string;
7654
- expiresAt?: string;
7655
- metadata?: Record<string, unknown>;
7674
+ firstName?: string;
7675
+ lastName?: string;
7676
+ profilePictureUrl?: string;
7677
+ inviteCode?: string;
7656
7678
  }): Promise<HttpResponse<{
7657
- id?: string;
7658
- code?: string;
7659
- label?: string;
7660
- maxUses?: number;
7661
- currentUses?: number;
7662
- status?: string;
7663
- expiresAt?: string;
7664
- createdAt?: string;
7665
- shareUrl?: string;
7679
+ data?: User;
7680
+ created?: boolean;
7666
7681
  }>>;
7667
7682
  /**
7668
- * Get invite system statistics
7669
- * Aggregate statistics for the invite system
7683
+ * Get current user
7684
+ * Get the currently authenticated user's profile and usage information
7670
7685
  */
7671
- adminGetInviteStats(): Promise<HttpResponse<{
7672
- totalCodes?: number;
7673
- activeCodes?: number;
7674
- totalRedemptions?: number;
7675
- totalCapacity?: number;
7676
- utilizationRate?: number;
7677
- recentRedemptions?: {
7678
- code?: string;
7679
- email?: string;
7680
- redeemedAt?: string;
7681
- }[];
7686
+ getCurrentUser(): Promise<HttpResponse<{
7687
+ data?: User;
7688
+ usage?: UserUsage;
7682
7689
  }>>;
7683
7690
  /**
7684
- * Get invite code details
7685
- * Get details for a single invite code including redemptions
7686
- * @param code - The invite code
7691
+ * Update current user
7692
+ * Update the currently authenticated user's profile
7693
+ * @param body - Request body
7687
7694
  */
7688
- adminGetInviteCode(code: string): Promise<HttpResponse<{
7689
- id?: string;
7690
- code?: string;
7691
- email?: string;
7692
- label?: string;
7693
- maxUses?: number;
7694
- currentUses?: number;
7695
- status?: string;
7696
- redemptions?: {
7697
- userId?: string;
7698
- email?: string;
7699
- redeemedAt?: string;
7700
- }[];
7695
+ updateCurrentUser(options?: {
7696
+ body?: {
7697
+ firstName?: string;
7698
+ lastName?: string;
7699
+ profilePictureUrl?: string;
7700
+ };
7701
+ }): Promise<HttpResponse<{
7702
+ data?: User;
7701
7703
  }>>;
7702
7704
  /**
7703
- * Revoke an invite code
7704
- * Revoke an invite code. Existing accounts created with this code are unaffected.
7705
- * @param code -
7705
+ * Get current user's usage
7706
+ * Get the currently authenticated user's memory usage statistics
7706
7707
  */
7707
- adminRevokeInviteCode(code: string): Promise<HttpResponse<{
7708
- code?: string;
7709
- status?: string;
7710
- message?: string;
7708
+ getCurrentUserUsage(): Promise<HttpResponse<{
7709
+ data?: UserUsage;
7711
7710
  }>>;
7712
7711
  /**
7713
- * Get gate status with audit info
7714
- * Get current invite gate state with audit information
7712
+ * Export all user data
7713
+ * Export all user data as a JSON archive. Includes profile, memories,
7714
+ conversations, facts, and patterns. Supports GDPR Article 20
7715
+ (right to data portability). Sensitive fields (Stripe customer ID,
7716
+ WorkOS ID, embeddings) are excluded.
7717
+
7715
7718
  */
7716
- adminGetGateStatus(): Promise<HttpResponse<{
7717
- gated?: boolean;
7718
- updatedAt?: string;
7719
- updatedBy?: string;
7719
+ exportUserData(): Promise<HttpResponse<{
7720
+ exportVersion?: string;
7721
+ exportedAt?: string;
7722
+ counts?: {
7723
+ memories?: number;
7724
+ conversations?: number;
7725
+ facts?: number;
7726
+ patterns?: number;
7727
+ };
7728
+ profile?: Record<string, unknown>;
7729
+ memories?: Memory[];
7730
+ conversations?: Conversation[];
7731
+ facts?: Fact[];
7732
+ patterns?: Pattern[];
7720
7733
  }>>;
7721
7734
  /**
7722
- * Toggle invite gate
7723
- * Toggle the invite gate. When enabled (true), new signups require a valid invite code.
7724
- When disabled (false), registration is open. Takes effect immediately.
7735
+ * Initiate account deletion
7736
+ * Schedule the current user's account for deletion after a 7-day grace period.
7737
+ Requires email confirmation. Immediately revokes API keys and cancels
7738
+ any active subscription. The account enters read-only mode.
7725
7739
 
7726
7740
  * @param body - Request body
7727
7741
  */
7728
- adminSetGateStatus(body: {
7729
- enabled: boolean;
7742
+ initiateAccountDeletion(body: {
7743
+ confirmationEmail: string;
7730
7744
  }): Promise<HttpResponse<{
7731
- gated?: boolean;
7732
- updatedAt?: string;
7745
+ data?: User;
7746
+ message?: string;
7747
+ }>>;
7748
+ /**
7749
+ * Cancel account deletion
7750
+ * Cancel a pending account deletion during the grace period.
7751
+ Note: Previously revoked API keys are not restored — new keys must be created.
7752
+ Stripe subscription may need manual reactivation via the billing portal.
7753
+
7754
+ */
7755
+ cancelAccountDeletion(): Promise<HttpResponse<{
7756
+ data?: User;
7733
7757
  message?: string;
7734
7758
  }>>;
7759
+ /**
7760
+ * Get user by ID
7761
+ * Get a user by their internal ID (admin only)
7762
+ * @param id -
7763
+ */
7764
+ getUserById(id: string): Promise<HttpResponse<{
7765
+ data?: User;
7766
+ }>>;
7735
7767
  }
7736
7768
 
7737
7769
  /**
@@ -7745,42 +7777,42 @@ declare class AdminService extends BaseService {
7745
7777
  */
7746
7778
  declare class Memnexus {
7747
7779
  private readonly config;
7748
- /** User management and profile endpoints operations */
7749
- readonly users: UsersService;
7750
- /** Topic detection, clustering, and management endpoints operations */
7751
- readonly topics: TopicsService;
7780
+ /** Admin management endpoints for invite codes and platform configuration operations */
7781
+ readonly admin: AdminService;
7782
+ /** API key management endpoints operations */
7783
+ readonly apiKeys: ApiKeysService;
7784
+ /** Artifact storage and retrieval endpoints operations */
7785
+ readonly artifacts: ArtifactsService;
7786
+ /** Subscription billing and payment management endpoints operations */
7787
+ readonly billing: BillingService;
7788
+ /** Conversation tracking and analysis endpoints operations */
7789
+ readonly conversations: ConversationsService;
7790
+ /** Entity extraction and discovery endpoints operations */
7791
+ readonly entities: EntitiesService;
7792
+ /** Fact extraction and management endpoints operations */
7793
+ readonly facts: FactsService;
7794
+ /** Graph-based retrieval augmented generation endpoints operations */
7795
+ readonly graphrag: GraphragService;
7796
+ /** Health check endpoints operations */
7797
+ readonly health: HealthService;
7798
+ /** Invite code validation and gate status endpoints operations */
7799
+ readonly invites: InvitesService;
7800
+ /** Memory management and retrieval endpoints operations */
7801
+ readonly memories: MemoriesService;
7802
+ /** Observability and metrics endpoints for production monitoring operations */
7803
+ readonly monitoring: MonitoringService;
7804
+ /** Narrative thread management endpoints operations */
7805
+ readonly narratives: NarrativesService;
7752
7806
  /** System health, monitoring, and configuration endpoints operations */
7753
7807
  readonly system: SystemService;
7754
7808
  /** Pattern detection and behavioral analysis endpoints operations */
7755
7809
  readonly patterns: PatternsService;
7756
7810
  /** Behavioral pattern tracking and state management endpoints operations */
7757
7811
  readonly behavior: BehaviorService;
7758
- /** Narrative thread management endpoints operations */
7759
- readonly narratives: NarrativesService;
7760
- /** Observability and metrics endpoints for production monitoring operations */
7761
- readonly monitoring: MonitoringService;
7762
- /** Memory management and retrieval endpoints operations */
7763
- readonly memories: MemoriesService;
7764
- /** Invite code validation and gate status endpoints operations */
7765
- readonly invites: InvitesService;
7766
- /** Health check endpoints operations */
7767
- readonly health: HealthService;
7768
- /** Graph-based retrieval augmented generation endpoints operations */
7769
- readonly graphrag: GraphragService;
7770
- /** Fact extraction and management endpoints operations */
7771
- readonly facts: FactsService;
7772
- /** Entity extraction and discovery endpoints operations */
7773
- readonly entities: EntitiesService;
7774
- /** Conversation tracking and analysis endpoints operations */
7775
- readonly conversations: ConversationsService;
7776
- /** Subscription billing and payment management endpoints operations */
7777
- readonly billing: BillingService;
7778
- /** Artifact storage and retrieval endpoints operations */
7779
- readonly artifacts: ArtifactsService;
7780
- /** API key management endpoints operations */
7781
- readonly apiKeys: ApiKeysService;
7782
- /** Admin management endpoints for invite codes and platform configuration operations */
7783
- readonly admin: AdminService;
7812
+ /** Topic detection, clustering, and management endpoints operations */
7813
+ readonly topics: TopicsService;
7814
+ /** User management and profile endpoints operations */
7815
+ readonly users: UsersService;
7784
7816
  /**
7785
7817
  * Create a new SDK client.
7786
7818
  * @param config - SDK configuration
@@ -7803,4 +7835,4 @@ declare class Memnexus {
7803
7835
  setEnvironment(environment: Environment): void;
7804
7836
  }
7805
7837
 
7806
- export { type AddMemoryToNarrativeRequest, AdminService, type ApiKey, ApiKeysService, type Artifact, ArtifactsService, type BatchGetMemoriesMeta, type BatchGetMemoriesRequest, type BatchGetMemoriesResponse, BehaviorService, type BillingOverview, BillingService, type BuildContextActiveWork, type BuildContextActivity, type BuildContextFact, type BuildContextGotcha, type BuildContextMeta, type BuildContextPattern, type BuildContextRequest, type BuildContextResponse, type CheckoutSessionResponse, type Community, ContentType, type Conversation, ConversationsService, type CreateArtifactRequest, type CreateCheckoutSessionRequest, type CreateConversationRequest, type CreateFactRequest, type CreateMemoryRelationshipRequest, type CreateMemoryRequest, type CreateMemoryResponse, type CreateMemoryResponseMeta, type CreateNarrativeRequest, type CreatePortalSessionRequest, type DigestEntity, type DigestKeyFact, type DigestMetadata, type DigestRequest, type DigestResponse, type DigestSource, type DigestTimeRange, type EffectiveStateBreakdown, EntitiesService, type Entity, type EntityNode, Environment, type Error$1 as Error, type ErrorDefinition, type Fact, type FactSearchRequest, FactsService, type GetMemoryResponse, type GetNarrativeResponse, type GraphRAGQueryRequest, type GraphRAGQueryResponse, GraphragService, type HealthCheck, HealthService, type Hook, type HttpError, type HttpMetadata, type HttpMethod, type HttpRequest, type HttpResponse, InvitesService, type Invoice, type ListInvoicesResponse, type ListNarrativesResponse, type ListPaymentMethodsResponse, Memnexus, MemoriesService, type Memory, type MemoryRelationship, type MemoryRelationshipsResponse, MonitoringService, type NamedMemoryHistoryResponse, type NarrativeMemory, type NarrativeThread, type NarrativeTimelineResponse, NarrativesService, type Pagination, type Pattern, PatternsService, type PaymentMethod, type PortalSessionResponse, type RelatedMemoryResult, type RequestParameter, type ResponseDefinition, type RetryOptions, type SdkConfig, type SearchRequest, type SearchResponse, type SearchResult, SerializationStyle, type ServiceCheck, type Subscription, SystemService, type TemporalMetadata, type Topic, type TopicReference, TopicsService, type UpdateArtifactRequest, type UpdateFactRequest, type UpdateMemoryRequest, type UpdateNamedMemoryRequest, type UpdateNarrativeRequest, type User, type UserUsage, UsersService, type ValidationOptions, addMemoryToNarrativeRequest, apiKey, artifact, batchGetMemoriesMeta, batchGetMemoriesRequest, batchGetMemoriesResponse, billingOverview, buildContextActiveWork, buildContextActivity, buildContextFact, buildContextGotcha, buildContextMeta, buildContextPattern, buildContextRequest, buildContextResponse, checkoutSessionResponse, community, conversation, createArtifactRequest, createCheckoutSessionRequest, createConversationRequest, createFactRequest, createMemoryRelationshipRequest, createMemoryRequest, createMemoryResponse, createMemoryResponseMeta, createNarrativeRequest, createPortalSessionRequest, Memnexus as default, digestEntity, digestKeyFact, digestMetadata, digestRequest, digestResponse, digestSource, digestTimeRange, effectiveStateBreakdown, entity, entityNode, error, fact, factSearchRequest, getMemoryResponse, getNarrativeResponse, graphRAGQueryRequest, graphRAGQueryResponse, healthCheck, invoice, listInvoicesResponse, listNarrativesResponse, listPaymentMethodsResponse, memory, memoryRelationship, memoryRelationshipsResponse, namedMemoryHistoryResponse, narrativeMemory, narrativeThread, narrativeTimelineResponse, pagination, pattern, paymentMethod, portalSessionResponse, relatedMemoryResult, searchRequest, searchResponse, searchResult, serviceCheck, subscription, temporalMetadata, topic, topicReference, updateArtifactRequest, updateFactRequest, updateMemoryRequest, updateNamedMemoryRequest, updateNarrativeRequest, user, userUsage };
7838
+ export { type AddMemoryToNarrativeRequest, AdminService, type ApiKey, ApiKeysService, type Artifact, ArtifactsService, type BatchGetMemoriesMeta, type BatchGetMemoriesRequest, type BatchGetMemoriesResponse, BehaviorService, type BillingOverview, BillingService, type BuildContextActiveWork, type BuildContextActivity, type BuildContextFact, type BuildContextGotcha, type BuildContextMeta, type BuildContextPattern, type BuildContextRequest, type BuildContextResponse, type CheckoutSessionResponse, type Community, ContentType, type Conversation, ConversationsService, type CreateArtifactRequest, type CreateCheckoutSessionRequest, type CreateConversationRequest, type CreateFactRequest, type CreateMemoryRelationshipRequest, type CreateMemoryRequest, type CreateMemoryResponse, type CreateMemoryResponseMeta, type CreateNarrativeRequest, type CreatePortalSessionRequest, type DigestEntity, type DigestKeyFact, type DigestMetadata, type DigestRequest, type DigestResponse, type DigestSource, type DigestTimeRange, type EffectiveStateBreakdown, EntitiesService, type Entity, type EntityNode, Environment, type Error$1 as Error, type ErrorDefinition, type Fact, type FactSearchRequest, FactsService, type GetMemoryResponse, type GetNarrativeResponse, type GraphRAGQueryRequest, type GraphRAGQueryResponse, GraphragService, type HealthCheck, HealthService, type Hook, type HttpError, type HttpMetadata, type HttpMethod, type HttpRequest, type HttpResponse, InvitesService, type Invoice, type ListInvoicesResponse, type ListNarrativesResponse, type ListPaymentMethodsResponse, Memnexus, MemoriesService, type Memory, type MemoryRelationship, type MemoryRelationshipsResponse, MonitoringService, type NamedMemoryHistoryResponse, type NarrativeMemory, type NarrativeThread, type NarrativeTimelineResponse, NarrativesService, type Pagination, type Pattern, PatternsService, type PaymentMethod, type PortalSessionResponse, type RelatedMemoryResult, type RequestParameter, type ResponseDefinition, type RetryOptions, type SdkConfig, SdkError, type SearchRequest, type SearchResponse, type SearchResult, SerializationStyle, type ServiceCheck, type Subscription, SystemService, type TemporalMetadata, type Topic, type TopicReference, TopicsService, type UpdateArtifactRequest, type UpdateFactRequest, type UpdateMemoryRequest, type UpdateNamedMemoryRequest, type UpdateNarrativeRequest, type User, type UserUsage, UsersService, type ValidationOptions, addMemoryToNarrativeRequest, apiKey, artifact, batchGetMemoriesMeta, batchGetMemoriesRequest, batchGetMemoriesResponse, billingOverview, buildContextActiveWork, buildContextActivity, buildContextFact, buildContextGotcha, buildContextMeta, buildContextPattern, buildContextRequest, buildContextResponse, checkoutSessionResponse, community, conversation, createArtifactRequest, createCheckoutSessionRequest, createConversationRequest, createFactRequest, createMemoryRelationshipRequest, createMemoryRequest, createMemoryResponse, createMemoryResponseMeta, createNarrativeRequest, createPortalSessionRequest, Memnexus as default, digestEntity, digestKeyFact, digestMetadata, digestRequest, digestResponse, digestSource, digestTimeRange, effectiveStateBreakdown, entity, entityNode, error, fact, factSearchRequest, getMemoryResponse, getNarrativeResponse, graphRAGQueryRequest, graphRAGQueryResponse, healthCheck, invoice, listInvoicesResponse, listNarrativesResponse, listPaymentMethodsResponse, memory, memoryRelationship, memoryRelationshipsResponse, namedMemoryHistoryResponse, narrativeMemory, narrativeThread, narrativeTimelineResponse, pagination, pattern, paymentMethod, portalSessionResponse, relatedMemoryResult, searchRequest, searchResponse, searchResult, serviceCheck, subscription, temporalMetadata, topic, topicReference, updateArtifactRequest, updateFactRequest, updateMemoryRequest, updateNamedMemoryRequest, updateNarrativeRequest, user, userUsage };