fix(storage): rename S3 configuration and change stream interfaces to storage-oriented types

This commit is contained in:
2026-03-14 23:27:25 +00:00
parent 2da2d57df1
commit a829f76d4b
21 changed files with 2133 additions and 2014 deletions

View File

@@ -1,7 +1,8 @@
import type * as plugins from '../plugins.js';
// Re-export S3 change event from smartbucket
export type { IS3ChangeEvent } from '@push.rocks/smartbucket';
// Re-export storage change event from smartbucket
import type { IStorageChangeEvent } from '@push.rocks/smartbucket';
export type { IStorageChangeEvent };
/**
* MongoDB change event - wraps smartdata watcher output
@@ -24,8 +25,8 @@ export interface IMongoChangeEvent {
*/
export interface IActivityEvent {
id: string;
source: 'mongodb' | 's3';
event: IMongoChangeEvent | import('@push.rocks/smartbucket').IS3ChangeEvent;
source: 'mongodb' | 'storage';
event: IMongoChangeEvent | IStorageChangeEvent;
timestamp: string;
}
@@ -69,11 +70,11 @@ export interface IReq_UnsubscribeMongo extends plugins.typedrequestInterfaces.im
}
/**
* Subscribe to S3 bucket/prefix changes
* Subscribe to storage bucket/prefix changes
*/
export interface IReq_SubscribeS3 extends plugins.typedrequestInterfaces.implementsTR<
export interface IReq_SubscribeStorage extends plugins.typedrequestInterfaces.implementsTR<
plugins.typedrequestInterfaces.ITypedRequest,
IReq_SubscribeS3
IReq_SubscribeStorage
> {
method: 'subscribeS3';
request: {
@@ -87,11 +88,11 @@ export interface IReq_SubscribeS3 extends plugins.typedrequestInterfaces.impleme
}
/**
* Unsubscribe from S3 bucket/prefix changes
* Unsubscribe from storage bucket/prefix changes
*/
export interface IReq_UnsubscribeS3 extends plugins.typedrequestInterfaces.implementsTR<
export interface IReq_UnsubscribeStorage extends plugins.typedrequestInterfaces.implementsTR<
plugins.typedrequestInterfaces.ITypedRequest,
IReq_UnsubscribeS3
IReq_UnsubscribeStorage
> {
method: 'unsubscribeS3';
request: {
@@ -104,7 +105,7 @@ export interface IReq_UnsubscribeS3 extends plugins.typedrequestInterfaces.imple
}
/**
* Subscribe to activity stream (all changes from MongoDB and S3)
* Subscribe to activity stream (all changes from MongoDB and storage)
*/
export interface IReq_SubscribeActivity extends plugins.typedrequestInterfaces.implementsTR<
plugins.typedrequestInterfaces.ITypedRequest,
@@ -169,15 +170,15 @@ export interface IReq_PushMongoChange extends plugins.typedrequestInterfaces.imp
}
/**
* Server pushes S3 change to client
* Server pushes storage change to client
*/
export interface IReq_PushS3Change extends plugins.typedrequestInterfaces.implementsTR<
export interface IReq_PushStorageChange extends plugins.typedrequestInterfaces.implementsTR<
plugins.typedrequestInterfaces.ITypedRequest,
IReq_PushS3Change
IReq_PushStorageChange
> {
method: 'pushS3Change';
request: {
event: import('@push.rocks/smartbucket').IS3ChangeEvent;
event: IStorageChangeEvent;
};
response: {
received: boolean;
@@ -206,7 +207,7 @@ export interface IReq_PushActivityEvent extends plugins.typedrequestInterfaces.i
export interface ISubscriptionTag extends plugins.typedrequestInterfaces.ITag {
name: 'subscription';
payload: {
type: 'mongo' | 's3' | 'activity';
type: 'mongo' | 'storage' | 'activity';
key: string; // e.g., "db/collection" or "bucket/prefix" or "activity"
};
}