diff --git a/change/@microsoft-teams-js-clipboard-read-device-permission-p0.json b/change/@microsoft-teams-js-clipboard-read-device-permission-p0.json new file mode 100644 index 0000000000..99a7cbba9d --- /dev/null +++ b/change/@microsoft-teams-js-clipboard-read-device-permission-p0.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "Add `DevicePermission.ClipboardRead` and clipboard permission telemetry/runtime foundations for the updated clipboard-read architecture (P0, additive; no behavior change)", + "packageName": "@microsoft/teams-js", + "email": "leahxia@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/packages/teams-js/src/internal/telemetry.ts b/packages/teams-js/src/internal/telemetry.ts index a8c21875dc..04f250fd93 100644 --- a/packages/teams-js/src/internal/telemetry.ts +++ b/packages/teams-js/src/internal/telemetry.ts @@ -105,6 +105,8 @@ export const enum ApiName { Chat_OpenGroupChat = 'chat.openGroupChat', Clipboard_Read = 'clipboard.read', Clipboard_Write = 'clipboard.write', + Clipboard_HasPermission = 'clipboard.hasPermission', + Clipboard_RequestPermission = 'clipboard.requestPermission', Conversations_CloseConversation = 'conversations.closeConversation', Conversations_GetChatMember = 'conversations.getChatMember', Conversations_OpenConversation = 'conversations.openConversation', diff --git a/packages/teams-js/src/public/interfaces.ts b/packages/teams-js/src/public/interfaces.ts index 0b87b13265..4b59caff99 100644 --- a/packages/teams-js/src/public/interfaces.ts +++ b/packages/teams-js/src/public/interfaces.ts @@ -1161,6 +1161,7 @@ export enum ErrorCode { export enum DevicePermission { GeoLocation = 'geolocation', Media = 'media', + ClipboardRead = 'clipboard-read', } /** @hidden */ diff --git a/packages/teams-js/src/public/runtime.ts b/packages/teams-js/src/public/runtime.ts index b258e58619..eeee1efb51 100644 --- a/packages/teams-js/src/public/runtime.ts +++ b/packages/teams-js/src/public/runtime.ts @@ -235,7 +235,15 @@ interface IRuntimeV4 extends IBaseRuntime { readonly calendar?: {}; readonly call?: {}; readonly chat?: {}; - readonly clipboard?: {}; + readonly clipboard?: { + /** + * When present, the host supports reading the clipboard natively in the app + * frame (via `navigator.clipboard`) gated by the `clipboard-read` device + * permission, instead of the legacy host-proxied `clipboard.readFromClipboard` + * path. Absent on older hosts, which fall back to the proxied path. + */ + readonly native?: {}; + }; readonly conversations?: {}; readonly copilot?: { readonly customTelemetry?: {};