FluidFramework/api-report/odsp-driver.api.md

8.8 KiB

API Report File for "@fluidframework/odsp-driver"

Do not edit this file. It is a report generated by API Extractor.


import { DriverPreCheckInfo } from '@fluidframework/driver-definitions';
import { HostStoragePolicy } from '@fluidframework/odsp-driver-definitions';
import { IConnected } from '@fluidframework/protocol-definitions';
import { IContainerPackageInfo } from '@fluidframework/driver-definitions';
import { IdentityType } from '@fluidframework/odsp-driver-definitions';
import { IDocumentService } from '@fluidframework/driver-definitions';
import { IDocumentServiceFactory } from '@fluidframework/driver-definitions';
import { IEntry } from '@fluidframework/odsp-driver-definitions';
import { IFileEntry } from '@fluidframework/odsp-driver-definitions';
import { IOdspResolvedUrl } from '@fluidframework/odsp-driver-definitions';
import { IOdspUrlParts } from '@fluidframework/odsp-driver-definitions';
import { IPersistedCache } from '@fluidframework/odsp-driver-definitions';
import { IRequest } from '@fluidframework/core-interfaces';
import { IResolvedUrl } from '@fluidframework/driver-definitions';
import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
import { ISharingLinkKind } from '@fluidframework/odsp-driver-definitions';
import { ISnapshotOptions } from '@fluidframework/odsp-driver-definitions';
import { ISnapshotTree } from '@fluidframework/protocol-definitions';
import { ISummaryTree } from '@fluidframework/protocol-definitions';
import { ITelemetryBaseLogger } from '@fluidframework/common-definitions';
import { ITelemetryLogger } from '@fluidframework/common-definitions';
import { ITelemetryProperties } from '@fluidframework/common-definitions';
import { IUrlResolver } from '@fluidframework/driver-definitions';
import { OdspResourceTokenFetchOptions } from '@fluidframework/odsp-driver-definitions';
import { PromiseCache } from '@fluidframework/common-utils';
import { RateLimiter } from '@fluidframework/driver-utils';
import { ShareLinkTypes } from '@fluidframework/odsp-driver-definitions';
import { TelemetryLogger } from '@fluidframework/telemetry-utils';
import { TokenFetcher } from '@fluidframework/odsp-driver-definitions';

// @public
export function checkUrl(documentUrl: URL): DriverPreCheckInfo | undefined;

// @public (undocumented)
export enum ClpCompliantAppHeader {
    // (undocumented)
    isClpCompliantApp = "X-CLP-Compliant-App"
}

// @public (undocumented)
export function createLocalOdspDocumentServiceFactory(localSnapshot: Uint8Array | string): IDocumentServiceFactory;

// @public
export function createOdspCreateContainerRequest(siteUrl: string, driveId: string, filePath: string, fileName: string, createShareLinkType?: ShareLinkTypes | ISharingLinkKind): IRequest;

// @public
export function createOdspUrl(l: OdspFluidDataStoreLocator): string;

// @public
export function encodeOdspFluidDataStoreLocator(locator: OdspFluidDataStoreLocator): string;

// @public
export function getApiRoot(origin: string): string;

// @public (undocumented)
export function getHashedDocumentId(driveId: string, itemId: string): Promise<string>;

// @public
export function getLocatorFromOdspUrl(url: URL): OdspFluidDataStoreLocator | undefined;

// @public
export function getOdspUrlParts(url: URL): Promise<IOdspUrlParts | undefined>;

// @public (undocumented)
export interface IClpCompliantAppHeader {
    // (undocumented)
    [ClpCompliantAppHeader.isClpCompliantApp]: boolean;
}

// @public (undocumented)
export interface ISharingLinkHeader {
    // (undocumented)
    [SharingLinkHeader.isSharingLinkToRedeem]: boolean;
}

// @public (undocumented)
export interface ISnapshotContents {
    // (undocumented)
    blobs: Map<string, ArrayBuffer>;
    latestSequenceNumber: number | undefined;
    // (undocumented)
    ops: ISequencedDocumentMessage[];
    sequenceNumber: number | undefined;
    // (undocumented)
    snapshotTree: ISnapshotTree;
}

// @public
export function isOdcOrigin(origin: string): boolean;

// @public
export function isOdcUrl(url: string | URL): boolean;

// @public
export function isSpoUrl(url: string): boolean;

// @public (undocumented)
export const locatorQueryParamName = "nav";

// @public (undocumented)
export const OdcApiSiteOrigin = "https://my.microsoftpersonalcontent.com";

// @public (undocumented)
export const OdcFileSiteOrigin = "https://1drv.ms";

// @public
export class OdspDocumentServiceFactory extends OdspDocumentServiceFactoryCore {
    constructor(getStorageToken: TokenFetcher<OdspResourceTokenFetchOptions>, getWebsocketToken: TokenFetcher<OdspResourceTokenFetchOptions> | undefined, persistedCache?: IPersistedCache, hostPolicy?: HostStoragePolicy);
}

// @public
export class OdspDocumentServiceFactoryCore implements IDocumentServiceFactory {
    constructor(getStorageToken: TokenFetcher<OdspResourceTokenFetchOptions>, getWebsocketToken: TokenFetcher<OdspResourceTokenFetchOptions> | undefined, persistedCache?: IPersistedCache, hostPolicy?: HostStoragePolicy);
    // (undocumented)
    createContainer(createNewSummary: ISummaryTree | undefined, createNewResolvedUrl: IResolvedUrl, logger?: ITelemetryBaseLogger, clientIsSummarizer?: boolean): Promise<IDocumentService>;
    // (undocumented)
    createDocumentService(resolvedUrl: IResolvedUrl, logger?: ITelemetryBaseLogger, clientIsSummarizer?: boolean): Promise<IDocumentService>;
    // Warning: (ae-forgotten-export) The symbol "ICacheAndTracker" needs to be exported by the entry point index.d.ts
    //
    // (undocumented)
    protected createDocumentServiceCore(resolvedUrl: IResolvedUrl, odspLogger: TelemetryLogger, cacheAndTrackerArg?: ICacheAndTracker, clientIsSummarizer?: boolean): Promise<IDocumentService>;
    // (undocumented)
    protected persistedCache: IPersistedCache;
    // (undocumented)
    readonly protocolName = "fluid-odsp:";
}

// @public @deprecated (undocumented)
export class OdspDocumentServiceFactoryWithCodeSplit extends OdspDocumentServiceFactoryCore implements IDocumentServiceFactory {
    constructor(getStorageToken: TokenFetcher<OdspResourceTokenFetchOptions>, getWebsocketToken: TokenFetcher<OdspResourceTokenFetchOptions> | undefined, persistedCache?: IPersistedCache, hostPolicy?: HostStoragePolicy);
}

// @public
export class OdspDriverUrlResolver implements IUrlResolver {
    constructor();
    getAbsoluteUrl(resolvedUrl: IResolvedUrl, relativeUrl: string, packageInfoSource?: IContainerPackageInfo): Promise<string>;
    // (undocumented)
    resolve(request: IRequest): Promise<IOdspResolvedUrl>;
}

// @public
export class OdspDriverUrlResolverForShareLink implements IUrlResolver {
    constructor(shareLinkFetcherProps?: ShareLinkFetcherProps | undefined, logger?: ITelemetryBaseLogger, appName?: string | undefined, getContext?: ((resolvedUrl: IOdspResolvedUrl, dataStorePath: string) => Promise<string | undefined>) | undefined);
    appendDataStorePath(requestUrl: URL, pathToAppend: string): string | undefined;
    static createDocumentUrl(baseUrl: string, driverInfo: OdspFluidDataStoreLocator): string;
    // @deprecated
    static createNavParam(locator: OdspFluidDataStoreLocator): string;
    getAbsoluteUrl(resolvedUrl: IResolvedUrl, dataStorePath: string, packageInfoSource?: IContainerPackageInfo): Promise<string>;
    resolve(request: IRequest): Promise<IOdspResolvedUrl>;
}

// @public (undocumented)
export interface OdspFluidDataStoreLocator extends IOdspUrlParts {
    // (undocumented)
    appName?: string;
    // (undocumented)
    containerPackageName?: string;
    // (undocumented)
    context?: string;
    // (undocumented)
    dataStorePath: string;
    // (undocumented)
    fileVersion?: string;
}

// Warning: (ae-forgotten-export) The symbol "ISnapshotContentsWithProps" needs to be exported by the entry point index.d.ts
//
// @public
export function parseCompactSnapshotResponse(buffer: Uint8Array, logger: ITelemetryLogger): ISnapshotContentsWithProps;

// Warning: (ae-forgotten-export) The symbol "SnapshotFormatSupportType" needs to be exported by the entry point index.d.ts
//
// @public
export function prefetchLatestSnapshot(resolvedUrl: IResolvedUrl, getStorageToken: TokenFetcher<OdspResourceTokenFetchOptions>, persistedCache: IPersistedCache, forceAccessTokenViaAuthorizationHeader: boolean, logger: ITelemetryBaseLogger, hostSnapshotFetchOptions: ISnapshotOptions | undefined, enableRedeemFallback?: boolean, fetchBinarySnapshotFormat?: boolean, snapshotFormatFetchType?: SnapshotFormatSupportType): Promise<boolean>;

// @public
export interface ShareLinkFetcherProps {
    identityType: IdentityType;
    tokenFetcher: TokenFetcher<OdspResourceTokenFetchOptions>;
}

// @public (undocumented)
export enum SharingLinkHeader {
    // (undocumented)
    isSharingLinkToRedeem = "isSharingLinkToRedeem"
}

// @public
export function storeLocatorInOdspUrl(url: URL, locator: OdspFluidDataStoreLocator): void;

// (No @packageDocumentation comment for this package)