FluidFramework/api-report/azure-client.api.md

3.6 KiB

API Report File for "@fluidframework/azure-client"

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


import { ContainerSchema } from '@fluidframework/fluid-static';
import { IClient } from '@fluidframework/protocol-definitions';
import { IFluidContainer } from '@fluidframework/fluid-static';
import { IMember } from '@fluidframework/fluid-static';
import { IServiceAudience } from '@fluidframework/fluid-static';
import { ITelemetryBaseEvent } from '@fluidframework/common-definitions';
import { ITelemetryBaseLogger } from '@fluidframework/common-definitions';
import { ITokenClaims } from '@fluidframework/protocol-definitions';
import { ITokenProvider } from '@fluidframework/routerlicious-driver';
import { ITokenResponse } from '@fluidframework/routerlicious-driver';
import { IUser } from '@fluidframework/protocol-definitions';
import { ScopeType } from '@fluidframework/protocol-definitions';
import { ServiceAudience } from '@fluidframework/fluid-static';

// @public
export class AzureAudience extends ServiceAudience<AzureMember> implements IAzureAudience {
    // @internal
    protected createServiceMember(audienceMember: IClient): AzureMember;
}

// @public
export class AzureClient {
    constructor(props: AzureClientProps);
    copyContainer(id: string, containerSchema: ContainerSchema, version?: AzureContainerVersion): Promise<{
        container: IFluidContainer;
        services: AzureContainerServices;
    }>;
    createContainer(containerSchema: ContainerSchema): Promise<{
        container: IFluidContainer;
        services: AzureContainerServices;
    }>;
    getContainer(id: string, containerSchema: ContainerSchema): Promise<{
        container: IFluidContainer;
        services: AzureContainerServices;
    }>;
    getContainerVersions(id: string, options?: AzureGetVersionsOptions): Promise<AzureContainerVersion[]>;
}

// @public
export interface AzureClientProps {
    readonly connection: AzureRemoteConnectionConfig | AzureLocalConnectionConfig;
    readonly logger?: ITelemetryBaseLogger;
}

// @public
export interface AzureConnectionConfig {
    endpoint: string;
    tokenProvider: ITokenProvider;
    type: AzureConnectionConfigType;
}

// @public
export type AzureConnectionConfigType = "local" | "remote";

// @public
export interface AzureContainerServices {
    audience: IAzureAudience;
}

// @public
export interface AzureContainerVersion {
    date?: string;
    id: string;
}

// @public
export class AzureFunctionTokenProvider implements ITokenProvider {
    constructor(azFunctionUrl: string, user?: Pick<AzureMember<any>, "userId" | "userName" | "additionalDetails"> | undefined);
    // (undocumented)
    fetchOrdererToken(tenantId: string, documentId?: string): Promise<ITokenResponse>;
    // (undocumented)
    fetchStorageToken(tenantId: string, documentId: string): Promise<ITokenResponse>;
}

// @public
export interface AzureGetVersionsOptions {
    maxCount: number;
}

// @public
export interface AzureLocalConnectionConfig extends AzureConnectionConfig {
    type: "local";
}

// @public
export interface AzureMember<T = any> extends IMember {
    additionalDetails?: T;
    userName: string;
}

// @public
export interface AzureRemoteConnectionConfig extends AzureConnectionConfig {
    tenantId: string;
    type: "remote";
}

// @public
export interface AzureUser<T = any> extends IUser {
    additionalDetails?: T;
    name: string;
}

// @public
export type IAzureAudience = IServiceAudience<AzureMember>;

export { ITelemetryBaseEvent }

export { ITelemetryBaseLogger }

export { ITokenClaims }

export { ITokenProvider }

export { ITokenResponse }

export { IUser }

export { ScopeType }