5c68f8a1da
* feat(automate): delete automation be * feat(automate): delete automations fe * fix(automate): delete modal, update cache * chore(automate): minor formatting * fix(automate): delete blobs w automations * chore(automate): repair blob test * fix(automate): make sure to return * fix(automate): do soft delete * fix(automate): include deleted filter in project automation queries
55 lines
1.4 KiB
TypeScript
55 lines
1.4 KiB
TypeScript
import {
|
|
BlobStorageItem,
|
|
BlobStorageItemInput
|
|
} from '@/modules/blobstorage/domain/types'
|
|
import { MaybeNullOrUndefined, Nullable } from '@speckle/shared'
|
|
import type { Readable } from 'stream'
|
|
import { StoreFileStream } from '@/modules/blobstorage/domain/storageOperations'
|
|
|
|
export type GetBlobs = (params: {
|
|
streamId?: MaybeNullOrUndefined<string>
|
|
blobIds: string[]
|
|
}) => Promise<BlobStorageItem[]>
|
|
|
|
export type UpsertBlob = (item: BlobStorageItemInput) => Promise<BlobStorageItem>
|
|
|
|
export type UpdateBlob = (params: {
|
|
id: string
|
|
item: Partial<BlobStorageItem>
|
|
streamId?: string
|
|
}) => Promise<BlobStorageItem>
|
|
|
|
export type DeleteBlob = (params: { id: string; streamId?: string }) => Promise<number>
|
|
|
|
export type FullyDeleteBlob = (params: {
|
|
blobId: string
|
|
streamId: string
|
|
}) => Promise<void>
|
|
|
|
export type GetBlobMetadata = (params: {
|
|
blobId: string
|
|
streamId: string
|
|
}) => Promise<BlobStorageItem>
|
|
|
|
export type GetBlobMetadataCollection = (params: {
|
|
streamId: string
|
|
query?: Nullable<string>
|
|
limit?: Nullable<number>
|
|
cursor?: Nullable<string>
|
|
}) => Promise<{ blobs: BlobStorageItem[]; cursor: Nullable<string> }>
|
|
|
|
export type UploadFileStream = (
|
|
streamData: {
|
|
streamId: string
|
|
userId: string | undefined
|
|
},
|
|
blobData: {
|
|
blobId: string
|
|
fileName: string
|
|
fileType: string | undefined
|
|
fileStream: Readable | Buffer
|
|
}
|
|
) => Promise<{ blobId: string; fileName: string; fileHash: string }>
|
|
|
|
export { StoreFileStream }
|