memorysync-sdk 1.4.0 → 1.6.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.mts +136 -100
- package/dist/index.d.ts +136 -100
- package/dist/index.js +200 -70
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +200 -70
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -373,16 +373,39 @@ interface ControlPlaneConfig {
|
|
|
373
373
|
interface ControlPlaneRequestOptions {
|
|
374
374
|
projectId?: string;
|
|
375
375
|
}
|
|
376
|
+
interface SignupRequest {
|
|
377
|
+
email: string;
|
|
378
|
+
password: string;
|
|
379
|
+
organizationName: string;
|
|
380
|
+
fullName?: string;
|
|
381
|
+
}
|
|
382
|
+
interface SignupResponse {
|
|
383
|
+
message: string;
|
|
384
|
+
email: string;
|
|
385
|
+
requiresVerification: boolean;
|
|
386
|
+
}
|
|
376
387
|
interface LoginRequest {
|
|
377
388
|
email: string;
|
|
378
389
|
password: string;
|
|
379
390
|
}
|
|
391
|
+
interface TokenPair {
|
|
392
|
+
accessToken: string;
|
|
393
|
+
refreshToken: string;
|
|
394
|
+
tokenType: string;
|
|
395
|
+
}
|
|
396
|
+
interface RefreshRequest {
|
|
397
|
+
refreshToken: string;
|
|
398
|
+
}
|
|
399
|
+
interface CurrentUserResponse {
|
|
400
|
+
userId: string;
|
|
401
|
+
role: string | null;
|
|
402
|
+
org: string | number | null;
|
|
403
|
+
sid: number | null;
|
|
404
|
+
oauthScopes?: string[];
|
|
405
|
+
oauthAppId?: string | null;
|
|
406
|
+
}
|
|
380
407
|
interface LoginResponse {
|
|
381
|
-
tokens:
|
|
382
|
-
accessToken: string;
|
|
383
|
-
refreshToken: string;
|
|
384
|
-
tokenType: string;
|
|
385
|
-
};
|
|
408
|
+
tokens: TokenPair;
|
|
386
409
|
session: {
|
|
387
410
|
userId: number;
|
|
388
411
|
organizationId: number;
|
|
@@ -446,20 +469,6 @@ interface CurrentPlanResponse {
|
|
|
446
469
|
scheduledPlanId: string | null;
|
|
447
470
|
cancelAtPeriodEnd: boolean;
|
|
448
471
|
}
|
|
449
|
-
interface TeamMember {
|
|
450
|
-
id: string;
|
|
451
|
-
name: string;
|
|
452
|
-
email: string;
|
|
453
|
-
role: string;
|
|
454
|
-
status: string;
|
|
455
|
-
lastActive?: string | null;
|
|
456
|
-
mfaEnabled: boolean;
|
|
457
|
-
authMethod: string;
|
|
458
|
-
loginProvider?: string;
|
|
459
|
-
devices?: number;
|
|
460
|
-
sessions: number;
|
|
461
|
-
isScimManaged?: boolean;
|
|
462
|
-
}
|
|
463
472
|
interface Session {
|
|
464
473
|
id: number;
|
|
465
474
|
isCurrent: boolean;
|
|
@@ -477,58 +486,6 @@ interface SessionListResponse {
|
|
|
477
486
|
sessions: Session[];
|
|
478
487
|
currentSessionId: number | null;
|
|
479
488
|
}
|
|
480
|
-
type AuditSortDirection = "asc" | "desc";
|
|
481
|
-
interface AuditEventQuery {
|
|
482
|
-
limit?: number;
|
|
483
|
-
cursor?: number;
|
|
484
|
-
skip?: number;
|
|
485
|
-
sortDirection?: AuditSortDirection;
|
|
486
|
-
tenantId?: string;
|
|
487
|
-
actor?: string;
|
|
488
|
-
actorEmail?: string;
|
|
489
|
-
ip?: string;
|
|
490
|
-
action?: string;
|
|
491
|
-
resourceType?: string;
|
|
492
|
-
resourceId?: string;
|
|
493
|
-
severity?: string;
|
|
494
|
-
category?: string;
|
|
495
|
-
start?: string;
|
|
496
|
-
end?: string;
|
|
497
|
-
success?: boolean;
|
|
498
|
-
source?: string;
|
|
499
|
-
ingestMethod?: string;
|
|
500
|
-
search?: string;
|
|
501
|
-
includeStats?: boolean;
|
|
502
|
-
}
|
|
503
|
-
interface AuditActor {
|
|
504
|
-
id: string;
|
|
505
|
-
email: string | null;
|
|
506
|
-
name: string | null;
|
|
507
|
-
type: string;
|
|
508
|
-
}
|
|
509
|
-
interface AuditResource {
|
|
510
|
-
type: string;
|
|
511
|
-
id: string;
|
|
512
|
-
label: string | null;
|
|
513
|
-
}
|
|
514
|
-
interface AuditEvent {
|
|
515
|
-
id: number;
|
|
516
|
-
eventId: string;
|
|
517
|
-
timestamp: string;
|
|
518
|
-
category: string;
|
|
519
|
-
actor: AuditActor;
|
|
520
|
-
action: string;
|
|
521
|
-
resource: AuditResource;
|
|
522
|
-
severity: string;
|
|
523
|
-
success: boolean;
|
|
524
|
-
metadata?: Record<string, unknown> | null;
|
|
525
|
-
}
|
|
526
|
-
interface AuditEventListResponse {
|
|
527
|
-
events: AuditEvent[];
|
|
528
|
-
nextCursor: number | null;
|
|
529
|
-
stats?: Record<string, unknown> | null;
|
|
530
|
-
sort: AuditSortDirection;
|
|
531
|
-
}
|
|
532
489
|
interface IntegrationQuery {
|
|
533
490
|
category?: string;
|
|
534
491
|
}
|
|
@@ -552,28 +509,6 @@ interface OrganizationMembership {
|
|
|
552
509
|
organizationId: number;
|
|
553
510
|
role: string;
|
|
554
511
|
}
|
|
555
|
-
interface OrganizationSettingsQuery {
|
|
556
|
-
tenantId?: string;
|
|
557
|
-
}
|
|
558
|
-
interface OrganizationSettings {
|
|
559
|
-
tenantId: string;
|
|
560
|
-
tenantName: string;
|
|
561
|
-
tenantSlug: string;
|
|
562
|
-
description: string | null;
|
|
563
|
-
plan: string;
|
|
564
|
-
status: string;
|
|
565
|
-
createdAt: string;
|
|
566
|
-
contactEmail: string | null;
|
|
567
|
-
customDomain: string | null;
|
|
568
|
-
customDomainVerified: boolean;
|
|
569
|
-
logoUrl: string | null;
|
|
570
|
-
totalMemories: number;
|
|
571
|
-
activeUsers: number;
|
|
572
|
-
organizationName: string;
|
|
573
|
-
scheduledDeletionAt: string | null;
|
|
574
|
-
mfaEnrolled: boolean;
|
|
575
|
-
passwordEnabled: boolean;
|
|
576
|
-
}
|
|
577
512
|
interface Project {
|
|
578
513
|
id: string;
|
|
579
514
|
name: string;
|
|
@@ -584,6 +519,12 @@ interface Project {
|
|
|
584
519
|
createdAt: string;
|
|
585
520
|
updatedAt: string;
|
|
586
521
|
}
|
|
522
|
+
interface CreateProjectRequest {
|
|
523
|
+
name: string;
|
|
524
|
+
}
|
|
525
|
+
interface RenameProjectRequest {
|
|
526
|
+
name: string;
|
|
527
|
+
}
|
|
587
528
|
interface WebhookRetryConfig {
|
|
588
529
|
enabled?: boolean;
|
|
589
530
|
maxRetries?: number;
|
|
@@ -713,6 +654,81 @@ interface WebhookDeliveryListResponse {
|
|
|
713
654
|
page: number;
|
|
714
655
|
pageSize: number;
|
|
715
656
|
}
|
|
657
|
+
interface WebhookEventTypesResponse {
|
|
658
|
+
eventTypes: string[];
|
|
659
|
+
categories: Record<string, string[]>;
|
|
660
|
+
}
|
|
661
|
+
interface WebhookHealth {
|
|
662
|
+
activeWebhooks: number;
|
|
663
|
+
totalWebhooks: number;
|
|
664
|
+
totalDeliveriesAllTime: number;
|
|
665
|
+
totalDeliveries24h: number;
|
|
666
|
+
successRate7d: number;
|
|
667
|
+
failingEndpoints: number;
|
|
668
|
+
pendingRetries: number;
|
|
669
|
+
deadLetterCount: number;
|
|
670
|
+
}
|
|
671
|
+
interface RecentWebhookDeliveryQuery extends WebhookDeliveryQuery {
|
|
672
|
+
endpointId?: number;
|
|
673
|
+
}
|
|
674
|
+
type ExportFormat = "csv" | "jsonl";
|
|
675
|
+
type ExportScope = "filtered" | "all" | "date_range";
|
|
676
|
+
type ExportJobStatus = "queued" | "processing" | "generating" | "completed" | "failed" | "cancelled" | "expired";
|
|
677
|
+
interface ExportFilters {
|
|
678
|
+
q?: string | null;
|
|
679
|
+
userId?: string | null;
|
|
680
|
+
isSummary?: boolean | null;
|
|
681
|
+
tier?: string | null;
|
|
682
|
+
source?: string | null;
|
|
683
|
+
timeRange?: string | null;
|
|
684
|
+
dateFrom?: string | null;
|
|
685
|
+
dateTo?: string | null;
|
|
686
|
+
includeSoftDeleted?: boolean;
|
|
687
|
+
}
|
|
688
|
+
interface CreateExportRequest {
|
|
689
|
+
format?: ExportFormat;
|
|
690
|
+
scope?: ExportScope;
|
|
691
|
+
filters?: ExportFilters | null;
|
|
692
|
+
}
|
|
693
|
+
interface ExportJob {
|
|
694
|
+
id: string;
|
|
695
|
+
projectId: string | null;
|
|
696
|
+
environment: string;
|
|
697
|
+
format: ExportFormat;
|
|
698
|
+
scope: ExportScope;
|
|
699
|
+
filters: ExportFilters;
|
|
700
|
+
status: ExportJobStatus;
|
|
701
|
+
errorMessage: string | null;
|
|
702
|
+
retryCount: number;
|
|
703
|
+
totalRows: number | null;
|
|
704
|
+
processedRows: number;
|
|
705
|
+
progressPercentage: number;
|
|
706
|
+
fileSizeBytes: number | null;
|
|
707
|
+
sha256Hash: string | null;
|
|
708
|
+
downloadCount: number;
|
|
709
|
+
createdAt: string | null;
|
|
710
|
+
startedAt: string | null;
|
|
711
|
+
completedAt: string | null;
|
|
712
|
+
expiresAt: string | null;
|
|
713
|
+
downloadUrl: string | null;
|
|
714
|
+
}
|
|
715
|
+
interface CreateExportResponse {
|
|
716
|
+
job: ExportJob;
|
|
717
|
+
estimatedTotal: number | null;
|
|
718
|
+
}
|
|
719
|
+
interface ExportListQuery {
|
|
720
|
+
limit?: number;
|
|
721
|
+
}
|
|
722
|
+
interface ExportJobListResponse {
|
|
723
|
+
jobs: ExportJob[];
|
|
724
|
+
total: number;
|
|
725
|
+
}
|
|
726
|
+
interface ExportDownloadUrl {
|
|
727
|
+
downloadUrl: string;
|
|
728
|
+
expiresAt: string | null;
|
|
729
|
+
fileSizeBytes: number | null;
|
|
730
|
+
filename: string;
|
|
731
|
+
}
|
|
716
732
|
declare class ControlPlaneClient {
|
|
717
733
|
private readonly baseUrl;
|
|
718
734
|
private readonly accessToken?;
|
|
@@ -724,27 +740,47 @@ declare class ControlPlaneClient {
|
|
|
724
740
|
private throwForStatus;
|
|
725
741
|
bulkRevokeApiKeys(request: BulkRevokeApiKeysRequest, options?: ControlPlaneRequestOptions): Promise<BulkRevokeApiKeysResponse>;
|
|
726
742
|
testApiKey(keyId: number, options?: ControlPlaneRequestOptions): Promise<ApiKeyTestResponse>;
|
|
743
|
+
signup(request: SignupRequest): Promise<SignupResponse>;
|
|
727
744
|
login(request: LoginRequest, options?: ControlPlaneRequestOptions): Promise<LoginResponse>;
|
|
745
|
+
refresh(request: RefreshRequest): Promise<TokenPair>;
|
|
746
|
+
logout(request: RefreshRequest): Promise<void>;
|
|
747
|
+
me(): Promise<CurrentUserResponse>;
|
|
748
|
+
logoutAll(): Promise<void>;
|
|
728
749
|
getCurrentPlan(options?: ControlPlaneRequestOptions): Promise<CurrentPlanResponse>;
|
|
729
|
-
listTeamMembers(options?: ControlPlaneRequestOptions): Promise<TeamMember[]>;
|
|
730
|
-
suspendTeamMember(memberId: number, options?: ControlPlaneRequestOptions): Promise<TeamMember>;
|
|
731
|
-
removeTeamMember(memberId: number, options?: ControlPlaneRequestOptions): Promise<void>;
|
|
732
750
|
listSessions(options?: ControlPlaneRequestOptions): Promise<SessionListResponse>;
|
|
733
751
|
revokeSession(sessionId: number, options?: ControlPlaneRequestOptions): Promise<void>;
|
|
734
|
-
listAuditEvents(query?: AuditEventQuery, options?: ControlPlaneRequestOptions): Promise<AuditEventListResponse>;
|
|
735
752
|
listIntegrations(query?: IntegrationQuery, options?: ControlPlaneRequestOptions): Promise<Integration[]>;
|
|
736
753
|
createOrganization(request: CreateOrganizationRequest, options?: ControlPlaneRequestOptions): Promise<OrganizationMembership>;
|
|
737
754
|
listOrganizations(options?: ControlPlaneRequestOptions): Promise<OrganizationMembership[]>;
|
|
738
|
-
listOrganizationMembers(options?: ControlPlaneRequestOptions): Promise<TeamMember[]>;
|
|
739
|
-
getOrganizationSettings(query?: OrganizationSettingsQuery, options?: ControlPlaneRequestOptions): Promise<OrganizationSettings>;
|
|
740
755
|
listProjects(options?: ControlPlaneRequestOptions): Promise<Project[]>;
|
|
756
|
+
createProject(request: CreateProjectRequest, options?: ControlPlaneRequestOptions): Promise<Project>;
|
|
757
|
+
renameProject(projectId: string, request: RenameProjectRequest, options?: ControlPlaneRequestOptions): Promise<Project>;
|
|
758
|
+
archiveProject(projectId: string, options?: ControlPlaneRequestOptions): Promise<Project>;
|
|
759
|
+
unarchiveProject(projectId: string, options?: ControlPlaneRequestOptions): Promise<Project>;
|
|
760
|
+
deleteProject(projectId: string, options?: ControlPlaneRequestOptions): Promise<void>;
|
|
741
761
|
createWebhook(request: CreateWebhookRequest, options?: ControlPlaneRequestOptions): Promise<CreatedWebhook>;
|
|
742
762
|
listWebhooks(options?: ControlPlaneRequestOptions): Promise<WebhookListResponse>;
|
|
763
|
+
getWebhook(endpointId: number, options?: ControlPlaneRequestOptions): Promise<Webhook>;
|
|
764
|
+
getWebhookEventTypes(options?: ControlPlaneRequestOptions): Promise<WebhookEventTypesResponse>;
|
|
765
|
+
getWebhookHealth(options?: ControlPlaneRequestOptions): Promise<WebhookHealth>;
|
|
766
|
+
pauseWebhook(endpointId: number, options?: ControlPlaneRequestOptions): Promise<Webhook>;
|
|
767
|
+
resumeWebhook(endpointId: number, options?: ControlPlaneRequestOptions): Promise<Webhook>;
|
|
768
|
+
rotateWebhookSecret(endpointId: number, options?: ControlPlaneRequestOptions): Promise<CreatedWebhook>;
|
|
743
769
|
updateWebhook(endpointId: number, request: UpdateWebhookRequest, options?: ControlPlaneRequestOptions): Promise<Webhook>;
|
|
744
770
|
deleteWebhook(endpointId: number, options?: ControlPlaneRequestOptions): Promise<void>;
|
|
745
771
|
testWebhook(endpointId: number, request?: TestWebhookRequest, options?: ControlPlaneRequestOptions): Promise<TestWebhookResponse>;
|
|
746
772
|
replayWebhookDeliveries(endpointId: number, request?: ReplayWebhookDeliveriesRequest, options?: ControlPlaneRequestOptions): Promise<ReplayWebhookDeliveriesResponse>;
|
|
747
773
|
listWebhookDeliveries(endpointId: number, query?: WebhookDeliveryQuery, options?: ControlPlaneRequestOptions): Promise<WebhookDeliveryListResponse>;
|
|
774
|
+
getLatestWebhookDelivery(endpointId: number, options?: ControlPlaneRequestOptions): Promise<WebhookDelivery | null>;
|
|
775
|
+
listRecentWebhookDeliveries(query?: RecentWebhookDeliveryQuery, options?: ControlPlaneRequestOptions): Promise<WebhookDeliveryListResponse>;
|
|
776
|
+
getWebhookDelivery(deliveryId: number, options?: ControlPlaneRequestOptions): Promise<WebhookDelivery>;
|
|
777
|
+
retryWebhookDelivery(deliveryId: number, options?: ControlPlaneRequestOptions): Promise<WebhookDelivery>;
|
|
778
|
+
createExport(request: CreateExportRequest, options?: ControlPlaneRequestOptions): Promise<CreateExportResponse>;
|
|
779
|
+
listExports(query?: ExportListQuery, options?: ControlPlaneRequestOptions): Promise<ExportJobListResponse>;
|
|
780
|
+
getExport(jobId: string, options?: ControlPlaneRequestOptions): Promise<ExportJob>;
|
|
781
|
+
cancelExport(jobId: string, options?: ControlPlaneRequestOptions): Promise<ExportJob>;
|
|
782
|
+
retryExport(jobId: string, options?: ControlPlaneRequestOptions): Promise<CreateExportResponse>;
|
|
783
|
+
getExportDownloadUrl(jobId: string, options?: ControlPlaneRequestOptions): Promise<ExportDownloadUrl>;
|
|
748
784
|
}
|
|
749
785
|
|
|
750
786
|
/**
|
|
@@ -1220,4 +1256,4 @@ declare class MemorySyncClient {
|
|
|
1220
1256
|
}): Promise<Record<string, unknown>>;
|
|
1221
1257
|
}
|
|
1222
1258
|
|
|
1223
|
-
export { type AddRequest, type AddResponse, type AddSkippedResponse, type ApiKeyTestResponse, type ApiKeyTestStatus, type
|
|
1259
|
+
export { type AddRequest, type AddResponse, type AddSkippedResponse, type ApiKeyTestResponse, type ApiKeyTestStatus, AuthError, type BatchUpdateItem, type BatchUpdateItemResult, type BatchUpdateResponse, type BulkAddItem, type BulkAddItemResult, type BulkAddResponse, type BulkRevokeApiKeyResult, type BulkRevokeApiKeysRequest, type BulkRevokeApiKeysResponse, type ComposeRequest, type ComposeResponse, ConnectionOAuthNamespace, ConnectionsNamespace, ControlPlaneClient, type ControlPlaneConfig, type ControlPlaneRequestOptions, type CreateExportRequest, type CreateExportResponse, type CreateOrganizationRequest, type CreateProjectRequest, type CreateWebhookRequest, type CreatedWebhook, type CurrentPlanResponse, type CurrentUserResponse, type ExportDownloadUrl, type ExportFilters, type ExportFormat, type ExportJob, type ExportJobListResponse, type ExportJobStatus, type ExportListQuery, type ExportResponse, type ExportScope, type FeedbackResponse, type FeedbackSignal, type FeedbackSummary, type FeedbackTrend, type ForgetFilters, type ForgetRequest, GoogleDriveNamespace, GranolaNamespace, type HistoryResponse, type Integration, type IntegrationQuery, IntegrationsNamespace, type LoginRequest, type LoginResponse, type MemoryRecord, MemorySyncClient, type MemorySyncConfig, MemorySyncError, NotFoundError, ObjectsNamespace, type Ontology, type OntologyUpdateRequest, type OrganizationMembership, type Plan, type PlanLimits, type Project, ProvidersNamespace, type QueryFilters, type QueryRequest, type QueryResponse, RateLimitError, type RecentWebhookDeliveryQuery, type RefreshRequest, type RelationCreateRequest, type RelationRecord, type RelationshipType, type RenameProjectRequest, type ReplayWebhookDeliveriesRequest, type ReplayWebhookDeliveriesResponse, type RevisionEntry, type RevisionEvent, S3Namespace, ServerError, type Session, type SessionListResponse, type SignupRequest, type SignupResponse, SlackNamespace, type SummarizeRequest, SyncJobsNamespace, type TestWebhookRequest, type TestWebhookResponse, type TokenPair, type UpdateRequest, type UpdateWebhookRequest, type UploadRequest, ValidationError, WebCrawlerNamespace, type Webhook, type WebhookDelivery, type WebhookDeliveryListResponse, type WebhookDeliveryQuery, type WebhookEventTypesResponse, type WebhookHealth, type WebhookListResponse, type WebhookRetryConfig, type WebhookSignatureConfig };
|
package/dist/index.d.ts
CHANGED
|
@@ -373,16 +373,39 @@ interface ControlPlaneConfig {
|
|
|
373
373
|
interface ControlPlaneRequestOptions {
|
|
374
374
|
projectId?: string;
|
|
375
375
|
}
|
|
376
|
+
interface SignupRequest {
|
|
377
|
+
email: string;
|
|
378
|
+
password: string;
|
|
379
|
+
organizationName: string;
|
|
380
|
+
fullName?: string;
|
|
381
|
+
}
|
|
382
|
+
interface SignupResponse {
|
|
383
|
+
message: string;
|
|
384
|
+
email: string;
|
|
385
|
+
requiresVerification: boolean;
|
|
386
|
+
}
|
|
376
387
|
interface LoginRequest {
|
|
377
388
|
email: string;
|
|
378
389
|
password: string;
|
|
379
390
|
}
|
|
391
|
+
interface TokenPair {
|
|
392
|
+
accessToken: string;
|
|
393
|
+
refreshToken: string;
|
|
394
|
+
tokenType: string;
|
|
395
|
+
}
|
|
396
|
+
interface RefreshRequest {
|
|
397
|
+
refreshToken: string;
|
|
398
|
+
}
|
|
399
|
+
interface CurrentUserResponse {
|
|
400
|
+
userId: string;
|
|
401
|
+
role: string | null;
|
|
402
|
+
org: string | number | null;
|
|
403
|
+
sid: number | null;
|
|
404
|
+
oauthScopes?: string[];
|
|
405
|
+
oauthAppId?: string | null;
|
|
406
|
+
}
|
|
380
407
|
interface LoginResponse {
|
|
381
|
-
tokens:
|
|
382
|
-
accessToken: string;
|
|
383
|
-
refreshToken: string;
|
|
384
|
-
tokenType: string;
|
|
385
|
-
};
|
|
408
|
+
tokens: TokenPair;
|
|
386
409
|
session: {
|
|
387
410
|
userId: number;
|
|
388
411
|
organizationId: number;
|
|
@@ -446,20 +469,6 @@ interface CurrentPlanResponse {
|
|
|
446
469
|
scheduledPlanId: string | null;
|
|
447
470
|
cancelAtPeriodEnd: boolean;
|
|
448
471
|
}
|
|
449
|
-
interface TeamMember {
|
|
450
|
-
id: string;
|
|
451
|
-
name: string;
|
|
452
|
-
email: string;
|
|
453
|
-
role: string;
|
|
454
|
-
status: string;
|
|
455
|
-
lastActive?: string | null;
|
|
456
|
-
mfaEnabled: boolean;
|
|
457
|
-
authMethod: string;
|
|
458
|
-
loginProvider?: string;
|
|
459
|
-
devices?: number;
|
|
460
|
-
sessions: number;
|
|
461
|
-
isScimManaged?: boolean;
|
|
462
|
-
}
|
|
463
472
|
interface Session {
|
|
464
473
|
id: number;
|
|
465
474
|
isCurrent: boolean;
|
|
@@ -477,58 +486,6 @@ interface SessionListResponse {
|
|
|
477
486
|
sessions: Session[];
|
|
478
487
|
currentSessionId: number | null;
|
|
479
488
|
}
|
|
480
|
-
type AuditSortDirection = "asc" | "desc";
|
|
481
|
-
interface AuditEventQuery {
|
|
482
|
-
limit?: number;
|
|
483
|
-
cursor?: number;
|
|
484
|
-
skip?: number;
|
|
485
|
-
sortDirection?: AuditSortDirection;
|
|
486
|
-
tenantId?: string;
|
|
487
|
-
actor?: string;
|
|
488
|
-
actorEmail?: string;
|
|
489
|
-
ip?: string;
|
|
490
|
-
action?: string;
|
|
491
|
-
resourceType?: string;
|
|
492
|
-
resourceId?: string;
|
|
493
|
-
severity?: string;
|
|
494
|
-
category?: string;
|
|
495
|
-
start?: string;
|
|
496
|
-
end?: string;
|
|
497
|
-
success?: boolean;
|
|
498
|
-
source?: string;
|
|
499
|
-
ingestMethod?: string;
|
|
500
|
-
search?: string;
|
|
501
|
-
includeStats?: boolean;
|
|
502
|
-
}
|
|
503
|
-
interface AuditActor {
|
|
504
|
-
id: string;
|
|
505
|
-
email: string | null;
|
|
506
|
-
name: string | null;
|
|
507
|
-
type: string;
|
|
508
|
-
}
|
|
509
|
-
interface AuditResource {
|
|
510
|
-
type: string;
|
|
511
|
-
id: string;
|
|
512
|
-
label: string | null;
|
|
513
|
-
}
|
|
514
|
-
interface AuditEvent {
|
|
515
|
-
id: number;
|
|
516
|
-
eventId: string;
|
|
517
|
-
timestamp: string;
|
|
518
|
-
category: string;
|
|
519
|
-
actor: AuditActor;
|
|
520
|
-
action: string;
|
|
521
|
-
resource: AuditResource;
|
|
522
|
-
severity: string;
|
|
523
|
-
success: boolean;
|
|
524
|
-
metadata?: Record<string, unknown> | null;
|
|
525
|
-
}
|
|
526
|
-
interface AuditEventListResponse {
|
|
527
|
-
events: AuditEvent[];
|
|
528
|
-
nextCursor: number | null;
|
|
529
|
-
stats?: Record<string, unknown> | null;
|
|
530
|
-
sort: AuditSortDirection;
|
|
531
|
-
}
|
|
532
489
|
interface IntegrationQuery {
|
|
533
490
|
category?: string;
|
|
534
491
|
}
|
|
@@ -552,28 +509,6 @@ interface OrganizationMembership {
|
|
|
552
509
|
organizationId: number;
|
|
553
510
|
role: string;
|
|
554
511
|
}
|
|
555
|
-
interface OrganizationSettingsQuery {
|
|
556
|
-
tenantId?: string;
|
|
557
|
-
}
|
|
558
|
-
interface OrganizationSettings {
|
|
559
|
-
tenantId: string;
|
|
560
|
-
tenantName: string;
|
|
561
|
-
tenantSlug: string;
|
|
562
|
-
description: string | null;
|
|
563
|
-
plan: string;
|
|
564
|
-
status: string;
|
|
565
|
-
createdAt: string;
|
|
566
|
-
contactEmail: string | null;
|
|
567
|
-
customDomain: string | null;
|
|
568
|
-
customDomainVerified: boolean;
|
|
569
|
-
logoUrl: string | null;
|
|
570
|
-
totalMemories: number;
|
|
571
|
-
activeUsers: number;
|
|
572
|
-
organizationName: string;
|
|
573
|
-
scheduledDeletionAt: string | null;
|
|
574
|
-
mfaEnrolled: boolean;
|
|
575
|
-
passwordEnabled: boolean;
|
|
576
|
-
}
|
|
577
512
|
interface Project {
|
|
578
513
|
id: string;
|
|
579
514
|
name: string;
|
|
@@ -584,6 +519,12 @@ interface Project {
|
|
|
584
519
|
createdAt: string;
|
|
585
520
|
updatedAt: string;
|
|
586
521
|
}
|
|
522
|
+
interface CreateProjectRequest {
|
|
523
|
+
name: string;
|
|
524
|
+
}
|
|
525
|
+
interface RenameProjectRequest {
|
|
526
|
+
name: string;
|
|
527
|
+
}
|
|
587
528
|
interface WebhookRetryConfig {
|
|
588
529
|
enabled?: boolean;
|
|
589
530
|
maxRetries?: number;
|
|
@@ -713,6 +654,81 @@ interface WebhookDeliveryListResponse {
|
|
|
713
654
|
page: number;
|
|
714
655
|
pageSize: number;
|
|
715
656
|
}
|
|
657
|
+
interface WebhookEventTypesResponse {
|
|
658
|
+
eventTypes: string[];
|
|
659
|
+
categories: Record<string, string[]>;
|
|
660
|
+
}
|
|
661
|
+
interface WebhookHealth {
|
|
662
|
+
activeWebhooks: number;
|
|
663
|
+
totalWebhooks: number;
|
|
664
|
+
totalDeliveriesAllTime: number;
|
|
665
|
+
totalDeliveries24h: number;
|
|
666
|
+
successRate7d: number;
|
|
667
|
+
failingEndpoints: number;
|
|
668
|
+
pendingRetries: number;
|
|
669
|
+
deadLetterCount: number;
|
|
670
|
+
}
|
|
671
|
+
interface RecentWebhookDeliveryQuery extends WebhookDeliveryQuery {
|
|
672
|
+
endpointId?: number;
|
|
673
|
+
}
|
|
674
|
+
type ExportFormat = "csv" | "jsonl";
|
|
675
|
+
type ExportScope = "filtered" | "all" | "date_range";
|
|
676
|
+
type ExportJobStatus = "queued" | "processing" | "generating" | "completed" | "failed" | "cancelled" | "expired";
|
|
677
|
+
interface ExportFilters {
|
|
678
|
+
q?: string | null;
|
|
679
|
+
userId?: string | null;
|
|
680
|
+
isSummary?: boolean | null;
|
|
681
|
+
tier?: string | null;
|
|
682
|
+
source?: string | null;
|
|
683
|
+
timeRange?: string | null;
|
|
684
|
+
dateFrom?: string | null;
|
|
685
|
+
dateTo?: string | null;
|
|
686
|
+
includeSoftDeleted?: boolean;
|
|
687
|
+
}
|
|
688
|
+
interface CreateExportRequest {
|
|
689
|
+
format?: ExportFormat;
|
|
690
|
+
scope?: ExportScope;
|
|
691
|
+
filters?: ExportFilters | null;
|
|
692
|
+
}
|
|
693
|
+
interface ExportJob {
|
|
694
|
+
id: string;
|
|
695
|
+
projectId: string | null;
|
|
696
|
+
environment: string;
|
|
697
|
+
format: ExportFormat;
|
|
698
|
+
scope: ExportScope;
|
|
699
|
+
filters: ExportFilters;
|
|
700
|
+
status: ExportJobStatus;
|
|
701
|
+
errorMessage: string | null;
|
|
702
|
+
retryCount: number;
|
|
703
|
+
totalRows: number | null;
|
|
704
|
+
processedRows: number;
|
|
705
|
+
progressPercentage: number;
|
|
706
|
+
fileSizeBytes: number | null;
|
|
707
|
+
sha256Hash: string | null;
|
|
708
|
+
downloadCount: number;
|
|
709
|
+
createdAt: string | null;
|
|
710
|
+
startedAt: string | null;
|
|
711
|
+
completedAt: string | null;
|
|
712
|
+
expiresAt: string | null;
|
|
713
|
+
downloadUrl: string | null;
|
|
714
|
+
}
|
|
715
|
+
interface CreateExportResponse {
|
|
716
|
+
job: ExportJob;
|
|
717
|
+
estimatedTotal: number | null;
|
|
718
|
+
}
|
|
719
|
+
interface ExportListQuery {
|
|
720
|
+
limit?: number;
|
|
721
|
+
}
|
|
722
|
+
interface ExportJobListResponse {
|
|
723
|
+
jobs: ExportJob[];
|
|
724
|
+
total: number;
|
|
725
|
+
}
|
|
726
|
+
interface ExportDownloadUrl {
|
|
727
|
+
downloadUrl: string;
|
|
728
|
+
expiresAt: string | null;
|
|
729
|
+
fileSizeBytes: number | null;
|
|
730
|
+
filename: string;
|
|
731
|
+
}
|
|
716
732
|
declare class ControlPlaneClient {
|
|
717
733
|
private readonly baseUrl;
|
|
718
734
|
private readonly accessToken?;
|
|
@@ -724,27 +740,47 @@ declare class ControlPlaneClient {
|
|
|
724
740
|
private throwForStatus;
|
|
725
741
|
bulkRevokeApiKeys(request: BulkRevokeApiKeysRequest, options?: ControlPlaneRequestOptions): Promise<BulkRevokeApiKeysResponse>;
|
|
726
742
|
testApiKey(keyId: number, options?: ControlPlaneRequestOptions): Promise<ApiKeyTestResponse>;
|
|
743
|
+
signup(request: SignupRequest): Promise<SignupResponse>;
|
|
727
744
|
login(request: LoginRequest, options?: ControlPlaneRequestOptions): Promise<LoginResponse>;
|
|
745
|
+
refresh(request: RefreshRequest): Promise<TokenPair>;
|
|
746
|
+
logout(request: RefreshRequest): Promise<void>;
|
|
747
|
+
me(): Promise<CurrentUserResponse>;
|
|
748
|
+
logoutAll(): Promise<void>;
|
|
728
749
|
getCurrentPlan(options?: ControlPlaneRequestOptions): Promise<CurrentPlanResponse>;
|
|
729
|
-
listTeamMembers(options?: ControlPlaneRequestOptions): Promise<TeamMember[]>;
|
|
730
|
-
suspendTeamMember(memberId: number, options?: ControlPlaneRequestOptions): Promise<TeamMember>;
|
|
731
|
-
removeTeamMember(memberId: number, options?: ControlPlaneRequestOptions): Promise<void>;
|
|
732
750
|
listSessions(options?: ControlPlaneRequestOptions): Promise<SessionListResponse>;
|
|
733
751
|
revokeSession(sessionId: number, options?: ControlPlaneRequestOptions): Promise<void>;
|
|
734
|
-
listAuditEvents(query?: AuditEventQuery, options?: ControlPlaneRequestOptions): Promise<AuditEventListResponse>;
|
|
735
752
|
listIntegrations(query?: IntegrationQuery, options?: ControlPlaneRequestOptions): Promise<Integration[]>;
|
|
736
753
|
createOrganization(request: CreateOrganizationRequest, options?: ControlPlaneRequestOptions): Promise<OrganizationMembership>;
|
|
737
754
|
listOrganizations(options?: ControlPlaneRequestOptions): Promise<OrganizationMembership[]>;
|
|
738
|
-
listOrganizationMembers(options?: ControlPlaneRequestOptions): Promise<TeamMember[]>;
|
|
739
|
-
getOrganizationSettings(query?: OrganizationSettingsQuery, options?: ControlPlaneRequestOptions): Promise<OrganizationSettings>;
|
|
740
755
|
listProjects(options?: ControlPlaneRequestOptions): Promise<Project[]>;
|
|
756
|
+
createProject(request: CreateProjectRequest, options?: ControlPlaneRequestOptions): Promise<Project>;
|
|
757
|
+
renameProject(projectId: string, request: RenameProjectRequest, options?: ControlPlaneRequestOptions): Promise<Project>;
|
|
758
|
+
archiveProject(projectId: string, options?: ControlPlaneRequestOptions): Promise<Project>;
|
|
759
|
+
unarchiveProject(projectId: string, options?: ControlPlaneRequestOptions): Promise<Project>;
|
|
760
|
+
deleteProject(projectId: string, options?: ControlPlaneRequestOptions): Promise<void>;
|
|
741
761
|
createWebhook(request: CreateWebhookRequest, options?: ControlPlaneRequestOptions): Promise<CreatedWebhook>;
|
|
742
762
|
listWebhooks(options?: ControlPlaneRequestOptions): Promise<WebhookListResponse>;
|
|
763
|
+
getWebhook(endpointId: number, options?: ControlPlaneRequestOptions): Promise<Webhook>;
|
|
764
|
+
getWebhookEventTypes(options?: ControlPlaneRequestOptions): Promise<WebhookEventTypesResponse>;
|
|
765
|
+
getWebhookHealth(options?: ControlPlaneRequestOptions): Promise<WebhookHealth>;
|
|
766
|
+
pauseWebhook(endpointId: number, options?: ControlPlaneRequestOptions): Promise<Webhook>;
|
|
767
|
+
resumeWebhook(endpointId: number, options?: ControlPlaneRequestOptions): Promise<Webhook>;
|
|
768
|
+
rotateWebhookSecret(endpointId: number, options?: ControlPlaneRequestOptions): Promise<CreatedWebhook>;
|
|
743
769
|
updateWebhook(endpointId: number, request: UpdateWebhookRequest, options?: ControlPlaneRequestOptions): Promise<Webhook>;
|
|
744
770
|
deleteWebhook(endpointId: number, options?: ControlPlaneRequestOptions): Promise<void>;
|
|
745
771
|
testWebhook(endpointId: number, request?: TestWebhookRequest, options?: ControlPlaneRequestOptions): Promise<TestWebhookResponse>;
|
|
746
772
|
replayWebhookDeliveries(endpointId: number, request?: ReplayWebhookDeliveriesRequest, options?: ControlPlaneRequestOptions): Promise<ReplayWebhookDeliveriesResponse>;
|
|
747
773
|
listWebhookDeliveries(endpointId: number, query?: WebhookDeliveryQuery, options?: ControlPlaneRequestOptions): Promise<WebhookDeliveryListResponse>;
|
|
774
|
+
getLatestWebhookDelivery(endpointId: number, options?: ControlPlaneRequestOptions): Promise<WebhookDelivery | null>;
|
|
775
|
+
listRecentWebhookDeliveries(query?: RecentWebhookDeliveryQuery, options?: ControlPlaneRequestOptions): Promise<WebhookDeliveryListResponse>;
|
|
776
|
+
getWebhookDelivery(deliveryId: number, options?: ControlPlaneRequestOptions): Promise<WebhookDelivery>;
|
|
777
|
+
retryWebhookDelivery(deliveryId: number, options?: ControlPlaneRequestOptions): Promise<WebhookDelivery>;
|
|
778
|
+
createExport(request: CreateExportRequest, options?: ControlPlaneRequestOptions): Promise<CreateExportResponse>;
|
|
779
|
+
listExports(query?: ExportListQuery, options?: ControlPlaneRequestOptions): Promise<ExportJobListResponse>;
|
|
780
|
+
getExport(jobId: string, options?: ControlPlaneRequestOptions): Promise<ExportJob>;
|
|
781
|
+
cancelExport(jobId: string, options?: ControlPlaneRequestOptions): Promise<ExportJob>;
|
|
782
|
+
retryExport(jobId: string, options?: ControlPlaneRequestOptions): Promise<CreateExportResponse>;
|
|
783
|
+
getExportDownloadUrl(jobId: string, options?: ControlPlaneRequestOptions): Promise<ExportDownloadUrl>;
|
|
748
784
|
}
|
|
749
785
|
|
|
750
786
|
/**
|
|
@@ -1220,4 +1256,4 @@ declare class MemorySyncClient {
|
|
|
1220
1256
|
}): Promise<Record<string, unknown>>;
|
|
1221
1257
|
}
|
|
1222
1258
|
|
|
1223
|
-
export { type AddRequest, type AddResponse, type AddSkippedResponse, type ApiKeyTestResponse, type ApiKeyTestStatus, type
|
|
1259
|
+
export { type AddRequest, type AddResponse, type AddSkippedResponse, type ApiKeyTestResponse, type ApiKeyTestStatus, AuthError, type BatchUpdateItem, type BatchUpdateItemResult, type BatchUpdateResponse, type BulkAddItem, type BulkAddItemResult, type BulkAddResponse, type BulkRevokeApiKeyResult, type BulkRevokeApiKeysRequest, type BulkRevokeApiKeysResponse, type ComposeRequest, type ComposeResponse, ConnectionOAuthNamespace, ConnectionsNamespace, ControlPlaneClient, type ControlPlaneConfig, type ControlPlaneRequestOptions, type CreateExportRequest, type CreateExportResponse, type CreateOrganizationRequest, type CreateProjectRequest, type CreateWebhookRequest, type CreatedWebhook, type CurrentPlanResponse, type CurrentUserResponse, type ExportDownloadUrl, type ExportFilters, type ExportFormat, type ExportJob, type ExportJobListResponse, type ExportJobStatus, type ExportListQuery, type ExportResponse, type ExportScope, type FeedbackResponse, type FeedbackSignal, type FeedbackSummary, type FeedbackTrend, type ForgetFilters, type ForgetRequest, GoogleDriveNamespace, GranolaNamespace, type HistoryResponse, type Integration, type IntegrationQuery, IntegrationsNamespace, type LoginRequest, type LoginResponse, type MemoryRecord, MemorySyncClient, type MemorySyncConfig, MemorySyncError, NotFoundError, ObjectsNamespace, type Ontology, type OntologyUpdateRequest, type OrganizationMembership, type Plan, type PlanLimits, type Project, ProvidersNamespace, type QueryFilters, type QueryRequest, type QueryResponse, RateLimitError, type RecentWebhookDeliveryQuery, type RefreshRequest, type RelationCreateRequest, type RelationRecord, type RelationshipType, type RenameProjectRequest, type ReplayWebhookDeliveriesRequest, type ReplayWebhookDeliveriesResponse, type RevisionEntry, type RevisionEvent, S3Namespace, ServerError, type Session, type SessionListResponse, type SignupRequest, type SignupResponse, SlackNamespace, type SummarizeRequest, SyncJobsNamespace, type TestWebhookRequest, type TestWebhookResponse, type TokenPair, type UpdateRequest, type UpdateWebhookRequest, type UploadRequest, ValidationError, WebCrawlerNamespace, type Webhook, type WebhookDelivery, type WebhookDeliveryListResponse, type WebhookDeliveryQuery, type WebhookEventTypesResponse, type WebhookHealth, type WebhookListResponse, type WebhookRetryConfig, type WebhookSignatureConfig };
|