Preparing search index...
        // AssetListResponse is returned by AssetListService.fetchAsync().
    // It has a protected constructor -- inspect ok, then read data or error.
    const { IAssetLibraryProvider, AssetFilter, AssetListRequest, EnvironmentSetting, Environment, Space } = await import('LensStudio:AssetLibrary');
    const provider = this.pluginSystem.findInterface(IAssetLibraryProvider.interfaceId) as import('LensStudio:AssetLibrary').IAssetLibraryProvider;
    const envSetting = new EnvironmentSetting();
    envSetting.environment = Environment.Production;
    envSetting.space = Space.Public;
    const filter = new AssetFilter();
    filter.searchText = 'hat';
    const request = new AssetListRequest(envSetting, filter);

    const response = await provider.assetService.fetchAsync(request);
    console.log('ok:', response.ok);
    console.log('cancelled:', response.cancelled);
    if (response.ok && response.data) {
    console.log('Asset count:', response.data.assets.length);
    } else if (response.error) {
    console.log('Error:', response.error);
    }
    Index

    Constructors

    Properties

    Constructors

    Properties

    cancelled: boolean

    Indicates whether the asset list request was cancelled before completion.

    The successful result payload of the asset list request, present when the request succeeded.

    error?: ServiceError

    The error details from the asset list request, present when the request failed.

    ok: boolean

    Indicates whether the asset list request completed successfully without errors.