chore: Refactor collection export to match import (#3483)

* chore: Refactor collection export to use FileOperations processor and task

* Tweak options
This commit is contained in:
Tom Moor
2022-05-01 21:06:07 -07:00
committed by GitHub
parent 669575fc89
commit eeb8008927
9 changed files with 210 additions and 181 deletions

View File

@@ -104,21 +104,6 @@ export type RevisionEvent = {
teamId: string;
};
export type CollectionExportEvent = {
name: "collections.export";
teamId: string;
actorId: string;
collectionId: string;
modelId: string;
};
export type CollectionExportAllEvent = {
name: "collections.export_all";
teamId: string;
actorId: string;
modelId: string;
};
export type FileOperationEvent = {
name:
| "fileOperations.create"
@@ -139,7 +124,7 @@ export type FileOperationEvent = {
export type CollectionEvent =
| {
name: "collections.create" // eslint-disable-line
name: "collections.create" // eslint-disable-line
| "collections.update"
| "collections.delete";
collectionId: string;
@@ -189,8 +174,7 @@ export type CollectionEvent =
sharingChanged: boolean;
};
ip: string;
}
| CollectionExportEvent;
};
export type GroupEvent =
| {
@@ -257,7 +241,6 @@ export type Event =
| PinEvent
| StarEvent
| CollectionEvent
| CollectionExportAllEvent
| FileOperationEvent
| IntegrationEvent
| GroupEvent