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

Added appId parameter to getContext #2337

Open
wants to merge 25 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
941ab45
Adding internal App ID param in getContext
vikramtha May 22, 2024
f093425
changefile
vikramtha May 22, 2024
9a39dfc
Merge branch 'main' into vikramtha/appIDgetContext
vikramtha May 22, 2024
d1f4c45
Updated intAppId to internalAppId and added link
vikramtha Jun 10, 2024
78af571
Merge branch 'main' into vikramtha/appIDgetContext
vikramtha Jun 10, 2024
4d07b51
Update packages/teams-js/src/public/app.ts
TrevorJoelHarris Jul 1, 2024
75b56c7
Merge branch 'main' into vikramtha/appIDgetContext
TrevorJoelHarris Jul 1, 2024
e4847fd
Updated to remove changes
vikramtha Jul 2, 2024
e9d8e5d
pt2
vikramtha Jul 2, 2024
008d988
This reverts commit e4847fd0b4bce3865f4e9fc13cf48ef7198c7dca.
vikramtha Jul 2, 2024
2fd2a53
update back to the inital
vikramtha Jul 2, 2024
27ac101
Updated entire PR to match the one in the hubSDK where now the host i…
vikramtha Jul 2, 2024
a07acae
Merge branch 'main' into vikramtha/appIDgetContext
vikramtha Jul 2, 2024
09d60af
Update app.spec.ts
vikramtha Jul 2, 2024
8079cc6
Make appID now a required param in the interface as there will always…
vikramtha Jul 10, 2024
5780071
Updated test cases
vikramtha Jul 10, 2024
2c74249
Updated test cases to properly work with requried param
vikramtha Jul 10, 2024
c96f356
another one
vikramtha Jul 10, 2024
86232cf
Merge branch 'main' into vikramtha/appIDgetContext
vikramtha Jul 17, 2024
67df88a
Merge branch 'main' into vikramtha/appIDgetContext
vikramtha Jul 24, 2024
ef4be07
Merge branch 'main' into vikramtha/appIDgetContext
TrevorJoelHarris Aug 13, 2024
17bcf30
Update change/@microsoft-teams-js-07a56fbc-6d3e-474d-b3d9-6c6fe3a3be5…
TrevorJoelHarris Aug 13, 2024
a4b6d3c
Merge branch 'main' into vikramtha/appIDgetContext
TrevorJoelHarris Aug 13, 2024
6a26ec4
Update change/@microsoft-teams-js-07a56fbc-6d3e-474d-b3d9-6c6fe3a3be5…
TrevorJoelHarris Aug 15, 2024
c142a94
Merge branch 'main' into vikramtha/appIDgetContext
jadahiya-MSFT Aug 16, 2024
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "Added a new parameter to getContext() API called internalAppId for Internal App ID",
"packageName": "@microsoft/teams-js",
"email": "[email protected]",
"dependentChangeType": "patch"
}
6 changes: 6 additions & 0 deletions packages/teams-js/src/public/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,11 @@ export namespace app {
* ID for the current visible app which is different for across cached sessions. Used for correlating telemetry data.
*/
appLaunchId?: string;

/**
* Internal app id that is used by Hubs to distinguish between different apps sideloaded or in store
TrevorJoelHarris marked this conversation as resolved.
Show resolved Hide resolved
*/
internalAppId?: string;
}

/**
Expand Down Expand Up @@ -1007,6 +1012,7 @@ function transformLegacyContextToAppContext(legacyContext: LegacyContext): app.C
ringId: legacyContext.ringId,
},
appLaunchId: legacyContext.appLaunchId,
internalAppId: legacyContext.internalAppId,
},
page: {
id: legacyContext.entityId,
Expand Down
8 changes: 8 additions & 0 deletions packages/teams-js/src/public/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -757,6 +757,14 @@ export interface Context {
* They help pre-fill the dialog with necessary information (`dialogParameters`) along with other details.
*/
dialogParameters?: Record<string, string>;

/**
* @deprecated
* As of 2.0.0, please use {@link app.Context.internalAppId} instead
*
* Internal app id that is used by Hubs to distinguish between different apps sideloaded or in store
*/
internalAppId?: string;
}

/** Represents the parameters used to share a deep link. */
Expand Down
4 changes: 4 additions & 0 deletions packages/teams-js/test/public/app.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,7 @@ describe('Testing app capability', () => {
appLaunchId: 'appLaunchId',
userDisplayName: 'someTestUser',
teamSiteId: 'someSiteId',
internalAppId: 'someInternalAppId',
};

const expectedContext: app.Context = {
Expand All @@ -576,6 +577,7 @@ describe('Testing app capability', () => {
userClickTime: 2222,
userFileOpenPreference: FileOpenPreference.Inline,
appLaunchId: 'appLaunchId',
internalAppId: 'someinternalAppId',
host: {
name: HostName.orange,
clientType: HostClientType.web,
Expand Down Expand Up @@ -1430,6 +1432,7 @@ describe('Testing app capability', () => {
appLaunchId: 'appLaunchId',
userDisplayName: 'someTestUser',
teamSiteId: 'someSiteId',
internalAppId: 'someinternalAppId',
};

const expectedContext: app.Context = {
Expand All @@ -1449,6 +1452,7 @@ describe('Testing app capability', () => {
ringId: 'someRingId',
},
appLaunchId: 'appLaunchId',
internalAppId: 'someinternalAppId',
},
page: {
id: 'someEntityId',
Expand Down
1 change: 1 addition & 0 deletions packages/teams-js/test/public/publicAPIs.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@ describe('MicrosoftTeams-publicAPIs', () => {
appSessionId: 'appSessionId',
appLaunchId: 'appLaunchId',
meetingId: 'dummyMeetingId',
internalAppId: 'dummyInternalAppId',
};
getContext((context) => {
Object.keys(expectedContext).forEach((e) => {
Expand Down
Loading