Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update getMeetingDetailsVerbose Interface #2489

Merged
merged 21 commits into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/teams-test-app/e2e-test-data/meeting.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@
},
{
"title": "getMeetingDetailsVerbose API Call - Success",
"version": ">2.22.0",
TrevorJoelHarris marked this conversation as resolved.
Show resolved Hide resolved
"version": ">2.26.0",
"type": "callResponse",
"boxSelector": "#box_getMeetingDetailsVerbose",
"expectedAlertValue": "getMeetingDetails called with shouldGetVerboseDetails: true",
KangxuanYe marked this conversation as resolved.
Show resolved Hide resolved
"expectedTestAppValue": "{\"details\":{\"scheduledStartTime\":\"testStartTime\",\"joinUrl\":\"testJoinUrl\",\"type\":\"oneOnOneCall\",\"originalCaller\":\"testCallerId\",\"dialedEntity\":\"testDnis\",\"trackingId\":\"testTrackingId\"},\"conversation\":{\"id\":\"testConversationId\"},\"organizer\":{\"id\":\"testOrganizerId\",\"tenantId\":\"testTenantId\"}}"
"expectedTestAppValue": "{\"details\":{\"scheduledStartTime\":\"testStartTime\",\"joinUrl\":\"testJoinUrl\",\"type\":\"oneOnOneCall\",\"originalCaller\":{\"phoneNumber\":\"testCallerPhoneNumber\",\"email\":\"testCallerEmail\"},\"dialedEntity\":{\"phoneNumber\":\"testCalleePhoneNumber\",\"email\":\"testCalleeEmail\"},\"trackingId\":\"testTrackingId\"},\"conversation\":{\"id\":\"testConversationId\"},\"organizer\":{\"id\":\"testOrganizerId\",\"tenantId\":\"testTenantId\"}}"
},
{
"title": "getAuthenticationTokenForAnonymousUser API Call - Success",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "Modified `getMeetingDetailsVerbose` API return interface so that the `originalCaller` and `dialedEntity` properties are of a new type `ICallParticipantIdentifiers",
"packageName": "@microsoft/teams-js",
"email": "[email protected]",
"dependentChangeType": "patch"
}
23 changes: 20 additions & 3 deletions packages/teams-js/src/public/meeting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,23 @@ export namespace meeting {
type?: T;
}

/**
* @hidden
* Hide from docs
* Data structure to represent call participant identifiers
*/
interface ICallParticipantIdentifiers {
/**
* Phone number of a PSTN caller
*/
phoneNumber?: string;
TrevorJoelHarris marked this conversation as resolved.
Show resolved Hide resolved

/**
* Email of a VoIP caller
*/
email?: string;
}

/**
* @hidden
* Hide from docs
Expand All @@ -102,13 +119,13 @@ export namespace meeting {
export interface ICallDetails extends IMeetingOrCallDetailsBase<CallType> {
/**
* @hidden
* Phone number of a PSTN caller or email of a VoIP caller
* originalCaller object
*/
originalCaller?: string;
originalCaller?: ICallParticipantIdentifiers;

/**
* @hidden
* Phone number of a PSTN callee or email of a VoIP callee
* dialedEntity object
*/
dialedEntity?: never;

Expand Down
10 changes: 8 additions & 2 deletions packages/teams-js/test/public/meeting.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,10 @@ describe('meeting', () => {
'https://teams.microsoft.com/l/meetup-join/19%3ameeting_qwertyuiop[phgfdsasdfghjkjbvcxcvbnmyt1234567890!@#$%^&*(%40thread.v2/0?context=%7b%22Tid%22%3a%2272f988bf-86f1-41af-91ab-2d7cd011db47%22%2c%22Oid%22%3a%226b33ac33-85ae-4995-be29-1d38a77aa8e3%22%7d',
type: meeting.CallType.OneOnOneCall,
// Verbose details
originalCaller: 'testCallerId',
originalCaller: {
phoneNumber: 'testCallerPhoneNumber',
email: 'testCallerEmail',
},
};
const organizer: meeting.IOrganizer = {
id: '8:orgid:6b33ac33-85ae-4995-be29-1d38a77aa8e3',
Expand Down Expand Up @@ -627,7 +630,10 @@ describe('meeting', () => {
'https://teams.microsoft.com/l/meetup-join/19%3ameeting_qwertyuiop[phgfdsasdfghjkjbvcxcvbnmyt1234567890!@#$%^&*(%40thread.v2/0?context=%7b%22Tid%22%3a%2272f988bf-86f1-41af-91ab-2d7cd011db47%22%2c%22Oid%22%3a%226b33ac33-85ae-4995-be29-1d38a77aa8e3%22%7d',
type: meeting.CallType.OneOnOneCall,
// Verbose details
originalCaller: 'testCallerId',
originalCaller: {
phoneNumber: 'testCallerPhoneNumber',
email: 'testCallerEmail',
},
};
const organizer: meeting.IOrganizer = {
id: '8:orgid:6b33ac33-85ae-4995-be29-1d38a77aa8e3',
Expand Down
Loading