@@ -19,7 +19,7 @@ import { Constants } from "common";
1919import { AsyncSubject , Observable , from , of , throwError } from "rxjs" ;
2020import { catchError , concat , concatMap , map , share , switchMap , take } from "rxjs/operators" ;
2121import { BlobStorageClientProxy } from "./blob-storage-client-proxy" ;
22- import { StorageClientService } from "./storage-client.service" ;
22+ import { StorageClient , StorageClientService } from "./storage-client.service" ;
2323
2424export interface ListBlobParams {
2525 storageAccountId : string ;
@@ -42,7 +42,10 @@ export interface BlobContentResult {
4242 content : string ;
4343}
4444
45- export type StorageContainerProperties = ContainerProperties ;
45+ export interface StorageContainerProperties extends Omit < ContainerProperties , "lastModified" | "etag" > {
46+ lastModified ?: Date ;
47+ etag ?: string ;
48+ }
4649
4750export interface NavigateBlobsOptions {
4851 /**
@@ -117,21 +120,16 @@ export class StorageBlobService {
117120
118121 this . _blobListGetter = new StorageListGetter ( FileRecord , this . storageClient , {
119122 cache : ( params ) => this . getBlobFileCache ( params ) ,
120- getData : ( client : BlobStorageClientProxy ,
121- params , options , continuationToken ) => {
123+ getData : async ( client : StorageClient , params , options , continuationToken ) => {
122124 const blobOptions : ListBlobOptions = {
123125 folder : options . original . folder ,
124126 recursive : options . original . recursive ,
125127 maxPages : options . original . limit ,
126128 maxPageSize : this . maxBlobPageSize
127129 } ;
128130
129- // N.B. `BlobItem` and `FileRecord` are nearly identical
130- return client . listBlobs (
131- params . container ,
132- blobOptions ,
133- continuationToken ,
134- ) as Promise < StorageBlobResult < FileRecord [ ] > > ;
131+ const blobs = await client . listBlobs ( params . container , blobOptions , continuationToken ) ;
132+ return { data : blobs . data . map ( blob => new FileRecord ( blob ) ) } ;
135133 } ,
136134 logIgnoreError : storageIgnoredErrors ,
137135 } ) ;
0 commit comments