Skip to content

Commit f1ffe31

Browse files
authored
Merge pull request #157 from HubSpot/add/public-app-endpoint
Add endpoint to fetch single public app metadata (Sister PR in HubSpot CLI)
2 parents 95a9b78 + f9078dc commit f1ffe31

2 files changed

Lines changed: 24 additions & 0 deletions

File tree

api/appsDev.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,12 @@ export function fetchPublicAppDeveloperTestAccountInstallData(
2828
url: `${APPS_DEV_API_PATH}/${appId}/test-portal-installs`,
2929
});
3030
}
31+
32+
export function fetchPublicAppMetadata(
33+
appId: number,
34+
accountId: number
35+
): Promise<PublicApp> {
36+
return http.get<PublicApp>(accountId, {
37+
url: `${APPS_DEV_API_PATH}/${appId}/full`,
38+
});
39+
}

types/Apps.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,24 @@ export type PublicApp = {
4343
};
4444
redirectUrls: Array<string>;
4545
scopeGroupIds: Array<number>;
46+
requiredScopeInfo?: Array<{ id: number; name: string }>;
4647
additionalScopeGroupIds: Array<number>;
48+
additionalScopeInfo?: Array<{ id: number; name: string }>;
4749
optionalScopeGroupIds: Array<number>;
50+
optionalScopeInfo?: Array<{ id: number; name: string }>;
4851
projectId: number | null;
4952
sourceId: string | null;
53+
providerInfo?: {
54+
domain: string;
55+
isVerified: boolean;
56+
};
57+
listingInfo?: {
58+
listingUrl: string;
59+
isCertified: boolean;
60+
isPublished: boolean;
61+
hasDraft: boolean;
62+
inReview: boolean;
63+
};
5064
allowedExternalUrls: Array<string>;
65+
preventProjectMigrations?: boolean;
5166
};

0 commit comments

Comments
 (0)