summaryrefslogtreecommitdiff
path: root/node_modules/@jet-app/app-store/tmp/src/common/product-page/bundle-page-common.js
blob: a0852c64b41461e7f8143bdc96aa7ecf356e45b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import { defaultAdditionalPlatformsForClient, Request } from "../../foundation/media/data-fetching";
/**
 * Generates a {@linkcode Request} to the `app-bundles` Media API endpoint
 */
export function makeBundlePageRequest(objectGraph, intent) {
    const mediaApiRequest = new Request(objectGraph)
        .withIdOfType(intent.id, "app-bundles")
        .includingAdditionalPlatforms(defaultAdditionalPlatformsForClient(objectGraph))
        .includingRelationships(["genres", "developer", "apps", "developer-other-apps", "reviews"]);
    if (objectGraph.client.isWeb) {
        // Ensure that the "web" client fully hydrates all PDP shelves
        mediaApiRequest.addingQuery("sparseLimit[developer-other-apps]", "15");
        if (objectGraph.bag.enableUpdatedAgeRatings) {
            mediaApiRequest.includingAttributes(["ageRating"]);
        }
    }
    return mediaApiRequest;
}
//# sourceMappingURL=bundle-page-common.js.map