Skip to content

Commit

Permalink
Removed any
Browse files Browse the repository at this point in the history
  • Loading branch information
rabwill committed Feb 22, 2024
1 parent f516a18 commit cdf8ee7
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
6 changes: 6 additions & 0 deletions samples/msgext-product-support-sso-ts/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions samples/msgext-product-support-sso-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"dependencies": {
"@azure/identity": "^4.0.1",
"@microsoft/microsoft-graph-client": "^3.0.7",
"@microsoft/microsoft-graph-types": "^2.40.0",
"adaptive-expressions": "^4.20.0",
"adaptivecards": "^3.0.1",
"adaptivecards-templating": "^2.3.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import viewProduct from '../adaptiveCards/viewProduct.json';
import {AuthService} from '../services/AuthService';
import {GraphService} from '../services/GraphService';
import {cleanupParam} from '../util';
import { ThumbnailSet } from '@microsoft/microsoft-graph-types';
let queryCount = 0;
export const HandleMessagingExtensionQuery = async (
context: TurnContext,
Expand Down Expand Up @@ -48,7 +49,7 @@ export const HandleMessagingExtensionQuery = async (
const attachments = [];
for (const obj of products) {
const template = new AdaptiveCards.Template(viewProduct);
const photo: any = await graphService.getPhotoFromSharePoint(
const photo: ThumbnailSet = await graphService.getPhotoFromSharePoint(
'Product Imagery',
obj.PhotoSubmission
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import {Client} from '@microsoft/microsoft-graph-client';
import {ProductItem} from '../types/ProductItems';
import config from '../config';
import {getFileNameFromUrl} from '../util';
import { ThumbnailSet } from '@microsoft/microsoft-graph-types';

const listFields = [
'id',
'fields/Title',
Expand Down Expand Up @@ -109,7 +111,7 @@ export class GraphService {
ReleaseDate: product.fields.ReleaseDate,
};
}
async getPhotoFromSharePoint(nameOfDrive, photoUrl): Promise<string> {
async getPhotoFromSharePoint(nameOfDrive, photoUrl): Promise<ThumbnailSet> {
const siteId = await this.getSharePointStieId();
const drive = await this.graphClient.api(`/sites/${siteId}/drives`).get();
const driveId = drive.value.find(drive => drive.name === nameOfDrive).id;
Expand Down

0 comments on commit cdf8ee7

Please sign in to comment.