Skip to content

Commit 75d4e5b

Browse files
committed
add fetchPublicAppProductionInstallCounts
1 parent 3ebcf9d commit 75d4e5b

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

api/appsDev.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import http from '../http';
22
import {
33
PublicApp,
4+
PublicApInstallCounts,
45
PublicAppDeveloperTestAccountInstallData,
56
} from '../types/Apps';
67

@@ -29,6 +30,15 @@ export function fetchPublicAppDeveloperTestAccountInstallData(
2930
});
3031
}
3132

33+
export function fetchPublicAppProductionInstallCounts(
34+
appId: number,
35+
accountId: number
36+
): Promise<PublicApInstallCounts> {
37+
return http.get<PublicApInstallCounts>(accountId, {
38+
url: `${APPS_DEV_API_PATH}/${appId}/install-counts-without-test-portals`,
39+
});
40+
}
41+
3242
export function fetchPublicAppMetadata(
3343
appId: number,
3444
accountId: number

types/Apps.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ export type PublicAppDeveloperTestAccountInstallData = {
1515
testPortalInstallCount: string;
1616
};
1717

18+
export type PublicApInstallCounts = {
19+
uniquePortalInstallCount: number;
20+
uniqueUserInstallCount: number;
21+
uniqueBusinessUnitInstallCount: number;
22+
};
23+
1824
export type PublicApp = {
1925
id: number;
2026
name: string;
@@ -36,11 +42,7 @@ export type PublicApp = {
3642
supportPhone: string | null;
3743
extensionIconUrl: string | null;
3844
isAdvancedScopesSettingEnabled: boolean;
39-
publicApplicationInstallCounts: {
40-
uniquePortalInstallCount: number;
41-
uniqueUserInstallCount: number;
42-
uniqueBusinessUnitInstallCount: number;
43-
};
45+
publicApplicationInstallCounts: PublicApInstallCounts;
4446
redirectUrls: Array<string>;
4547
scopeGroupIds: Array<number>;
4648
requiredScopeInfo?: Array<{ id: number; name: string }>;

0 commit comments

Comments
 (0)