From 123b6e8162a4b9f0a98db0cac5232301ae4dd6b8 Mon Sep 17 00:00:00 2001 From: Beau Cameron Date: Wed, 7 Aug 2024 17:34:46 -0600 Subject: [PATCH] Fixes 3091 Fix return type for GetById Updating return from useSharingLink --- docs/graph/shares.md | 2 ++ packages/graph/shares/types.ts | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/graph/shares.md b/docs/graph/shares.md index 30ceafdc2..ce16f59fa 100644 --- a/docs/graph/shares.md +++ b/docs/graph/shares.md @@ -71,7 +71,9 @@ const shareLinkInfo = { encodedSharingUrl: shareLink, redeemSharingLink: false }; +// default shared drive item response (id, name) const sharedDriveItem = await graph.shares.useSharingLink(shareLinkInfo); + ``` ## Create Sharing Link diff --git a/packages/graph/shares/types.ts b/packages/graph/shares/types.ts index a2e2aa590..ce2d3238f 100644 --- a/packages/graph/shares/types.ts +++ b/packages/graph/shares/types.ts @@ -45,7 +45,7 @@ export class _Shares extends _GraphCollection { * @param share: string - Share Id or Encoded Sharing Url * @returns Microsoft Graph - SharingLink */ - public async useSharingLink(shareLink: IShareLinkInfo): Promise { + public async useSharingLink(shareLink: IShareLinkInfo): Promise> { const q = Shares(this, shareLink.shareId || shareLink.encodedSharingUrl); if (shareLink.redeemSharingLink) { q.using(InjectHeaders({ @@ -60,7 +60,7 @@ export class _Shares extends _GraphCollection { return graphPost(q, body(shareLinkAccess)); } } -export interface IShares extends _Shares, IGetById { } +export interface IShares extends _Shares, IGetById { } export const Shares = graphInvokableFactory(_Shares);