summaryrefslogtreecommitdiff
path: root/node_modules/@jet-app/app-store/tmp/src/api/models/arcade.js
blob: a016e3be8e970b0f7847d4f01f4eabf0af8b0333 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
import * as models from "./index";
import * as metrics from "./metrics/metrics";
export function marketingItemContextFromString(context) {
    var _a, _b;
    if (preprocessor.GAMES_TARGET) {
        switch (context) {
            case "generic":
                return "gameCenterGeneric";
            case "groupingLockup":
                return "gameCenterLockup";
            case "arcadeTabHeader":
                return "gameCenterEditorialPageHeader";
            case "productPage":
                return "gameCenterProductPage";
            case "arcadeComingSoon":
                return "gameCenterComingSoon";
            case "gameCenterEditorialPage": // TBD
                return "gameCenterEditorialPage";
            default:
                return (_a = context) !== null && _a !== void 0 ? _a : "gameCenterGeneric";
        }
    }
    switch (context) {
        case "askToBuy":
            return "arcadeAskToBuy";
        case "generic":
            return "arcadeGeneric";
        case "groupingLockup":
            return "arcadeGroupingLockup";
        case "launchRepair":
            return "arcadeLaunchRepair";
        case "productPage":
            return "arcadeProductPage";
        case "topShelfATV":
            return "arcadeTopShelfATV";
        case "topShelfATVClickThrough":
            return "arcadeTopShelfATVClickThrough";
        case "editorialItem":
            return "arcadeTodayCard";
        case "editorialItemCanvas":
            return "arcadeStoryCanvas";
        case "arcadeComingSoon":
            return "arcadeComingSoon";
        case "arcadeTabHeader":
            return "arcadeTabHeader";
        case "arcadeTabNavBar":
            return "arcadeTabNavBar";
        default:
            return (_b = context) !== null && _b !== void 0 ? _b : "arcadeGeneric";
    }
}
export function isContextualUpsellContext(context) {
    if (preprocessor.GAMES_TARGET) {
        switch (context) {
            case "gameCenterLockup":
            case "gameCenterProductPage":
                return true;
            default:
                return false;
        }
    }
    switch (context) {
        case "arcadeGroupingLockup":
        case "arcadeProductPage":
        case "productPage":
        case "groupingLockup":
            return true;
        default:
            return false;
    }
}
/** @public */
export class ArcadeSubscribePage extends models.Model {
    constructor(details, dismissButtonTitle, offerButtonAction, offerDisplayProperties) {
        super();
        this.details = details;
        this.dismissButtonTitle = dismissButtonTitle;
        this.offerButtonAction = offerButtonAction;
        this.offerDisplayProperties = offerDisplayProperties;
        this.pageMetrics = new metrics.PageMetrics();
        this.pageRenderMetrics = {};
    }
}
/** @public */
export class ArcadeWelcomeItem extends models.Model {
    constructor(headline, body, artwork) {
        super();
        this.headline = headline;
        this.body = body;
        this.artwork = artwork;
    }
}
/** @public */
export class ArcadeWelcomeContent extends models.Model {
    constructor(title, subtitle, items, continueAction, familyAction) {
        super();
        this.title = title;
        this.subtitle = subtitle;
        this.items = items;
        this.continueAction = continueAction;
        this.familyAction = familyAction;
    }
}
/** @public */
export class ArcadeWelcomePage extends models.Model {
    constructor(individualContent, familyMemberContent) {
        super();
        this.individualContent = individualContent;
        this.familyMemberContent = familyMemberContent;
        this.pageMetrics = new metrics.PageMetrics();
        this.pageRenderMetrics = {};
    }
}
/** @public */
export class MarketingItemRequestInfo extends models.Model {
    constructor(serviceType, placement, metricsTopic, seed, clientOptions) {
        super();
        this.serviceType = serviceType;
        this.placement = placement;
        this.seed = seed;
        this.clientOptions = clientOptions;
        this.metricsOverlay = { topic: metricsTopic };
    }
}
/** @public */
export class DynamicUIRequestInfo extends models.Model {
    constructor(metricsTopic, clientOptions) {
        super();
        this.clientOptions = clientOptions;
        this.metricsOverlay = { topic: metricsTopic };
    }
}
/** @public */
export class UpsellGridContent extends models.Model {
    constructor(primaryIcon, icons) {
        super();
        this.primaryIcon = primaryIcon;
        this.icons = icons;
    }
}
/** @public */
export class AppStoreEngagementTask extends models.Model {
    constructor(action) {
        super();
        this.action = action;
    }
}
/** @public
 * A model for game category button on Arcade download pack screen.
 */
export class ArcadeDownloadPackCategory extends models.ViewModel {
    constructor(id, title, artwork, gradientStartColor, gradientEndColor) {
        super();
        this.id = id;
        this.title = title;
        this.artwork = artwork;
        this.gradientStartColor = gradientStartColor;
        this.gradientEndColor = gradientEndColor;
        this.selectActionMetrics = new models.ActionMetrics();
        this.deselectActionMetrics = new models.ActionMetrics();
    }
}
/** @public
 * Initial Arcade download pack screen with game categories to select by user.
 */
export class ArcadeDownloadPackCategoriesPage extends models.Model {
    constructor(title, categories, maxNumberOfCategoriesToChoose, maxNumberOfCategoriesToChooseTemplate, numberOfChosenCategoriesTemplate, primaryAction, dismissAction) {
        super();
        this.title = title;
        this.categories = categories;
        this.maxNumberOfCategoriesToChoose = maxNumberOfCategoriesToChoose;
        this.maxNumberOfCategoriesToChooseTemplate = maxNumberOfCategoriesToChooseTemplate;
        this.numberOfChosenCategoriesTemplate = numberOfChosenCategoriesTemplate;
        this.primaryAction = primaryAction;
        this.dismissAction = dismissAction;
        this.pageMetrics = new metrics.PageMetrics();
        this.pageRenderMetrics = {};
    }
}
/** @public
 * A lockup model for Arcade download suggestions pack screen with linked Arcade category.
 */
export class ArcadeDownloadPackSuggestion extends models.Model {
    constructor(lockup, categoryId) {
        super();
        this.lockup = lockup;
        this.categoryId = categoryId;
    }
}
/** @public
 * Follow up Arcade download pack screen with the list of suggested games.
 */
export class ArcadeDownloadPackSuggestionsPage extends models.Model {
    constructor(title, suggestions, getAllAction, getAllButtonStyle, primaryAction, primaryActionKind, primaryActionSecondaryTitle) {
        super();
        this.title = title;
        this.suggestions = suggestions;
        this.getAllAction = getAllAction;
        this.getAllButtonStyle = getAllButtonStyle;
        this.primaryAction = primaryAction;
        this.primaryActionKind = primaryActionKind;
        this.primaryActionSecondaryTitle = primaryActionSecondaryTitle;
        this.pageMetrics = new metrics.PageMetrics();
        this.pageRenderMetrics = {};
    }
}
/**
 * Matches untyped string with `ArcadeOnboardingSubscriptionStatus` typed value.
 * It is used to convert opaque `string` value that is passed across JS bridge from native code.
 * @param value `string` value with the same content.
 */
export function arcadeOnboardingSubscriptionStatusFromString(value) {
    switch (value) {
        case "new":
            return "new";
        case "existing":
            return "existing";
        default:
            return "unknown";
    }
}
/** @public
 * Purchase params to use in`ASDPurchaseManager.purchaseBatch` call.
 */
export class BatchPurchaseParams {
    constructor(items, commonBuyParams) {
        this.items = items;
        this.commonBuyParams = commonBuyParams;
    }
}
/** @public
 * Decorated purchase for a product with a separate buyParams map.
 */
export class BatchPurchaseItem {
    constructor(purchase, buyParams) {
        this.purchase = purchase;
        this.buyParams = buyParams;
    }
}
//# sourceMappingURL=arcade.js.map