@microsoft/sp-webpart-base
Version:
SharePoint Framework support for building web parts
91 lines • 3.08 kB
TypeScript
/// <reference types="office-js" />
import type * as microsoftTeams from '@microsoft/teams-js-v2';
import type { ILoaderConfiguration } from '@msinternal/copilot-common';
import type { LaunchOrigin } from '@msinternal/copilot-common/lib/interfaces/ICopilotTelemetryExtraData';
/**
* Provides access to agents-related functionalities.
* @alpha
*/
export interface IAgentsSDK {
/**
* Legacy API for backward compatibility
* @param loaderConfiguration - configuration for the agent to be displayed in sidecar
* @returns
*/
openAgentInSidecar: (loaderConfiguration: ILoaderConfiguration | undefined) => void;
/**
* Internal API with required launch origin tracking
* @param loaderConfiguration - configuration for the agent to be displayed in sidecar
* @param launchOrigin - origin from where the agent is launched (required for telemetry)
* @internal
*/
_openAgentInSidecarWithOrigin: (loaderConfiguration: ILoaderConfiguration | undefined, launchOrigin: LaunchOrigin) => void;
}
/**
* Provides access to the Teams SDK and Teams context. Only provided when the web part is loaded in Teams.
*
* @public
*/
export interface IMicrosoftTeams {
/**
* Microsoft Teams SDK.
*/
teamsJs: typeof microsoftTeams;
/**
* Microsoft Teams' Context.
*
* @deprecated
* This property is deprecated. Use the `teamsJs.app.getContext()` method instead.
*
* @remarks
* For more information, please see:
* {@link https://docs.microsoft.com/en-us/javascript/api/@microsoft/teams-js/microsoftteams.context?view=msteams-client-js-latest}
*/
context: microsoftTeams.Context;
}
/**
* Provides access to the Office context. Only provided when the web part is loaded in Office.
*
* @internal
* @deprecated The office add-in beta is no longer supported.
*/
export interface IOffice {
/**
* Microsoft Office SDK.
*/
context: Office.Context;
}
/**
* Conditional set of SDKs provided by SPFx dependent on the environment.
*
* @public
*/
export interface ISDKs {
/**
* Contextual information about the current Microsoft Teams tab. This object will only be defined if
* a component is being hosted in Microsoft Teams.
*
* @remarks
* For more information, please see:
* {@link https://docs.microsoft.com/en-us/javascript/api/@microsoft/teams-js/?view=msteams-client-js-latest}
*/
microsoftTeams?: IMicrosoftTeams;
/**
* Contextual information about the current Office app. This object will only be defined if
* a component is being hosted in an Office app.
*
* @remarks
* For more information, please see:
* {@link https://docs.microsoft.com/en-us/office/dev/add-ins/develop/understanding-the-javascript-api-for-office}
*
* @deprecated The office add-in beta is no longer supported.
* @internal
*/
office?: IOffice;
/**
* SDK for agents-related functionalities
* @alpha
*/
agents?: IAgentsSDK;
}
//# sourceMappingURL=ISDKs.d.ts.map