@mpgd/target-config 0.3.4 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import type { AdPlacementEntry, AdPlacements, ProductCatalog, ProductCatalogEntry } from '@mpgd/catalog';
2
- import type { FeatureAvailabilityReason, TargetCapabilityConfig, TargetConfig, TargetConfigMatrix, TargetFeatureConfig, TargetPolicyRestrictions, TargetReleaseConfig, TargetRuntimeKind } from './runtime';
2
+ import { type FeatureAvailabilityReason, type TargetCapabilityConfig, type TargetConfig, type TargetConfigMatrix, type TargetFeatureConfig, type TargetIntegrationConfig, type TargetPolicyRestrictions, type TargetReleaseConfig, type TargetRuntimeKind } from './runtime.js';
3
3
  export type EffectiveAvailabilityReason = FeatureAvailabilityReason | 'missing-platform-id';
4
4
  export interface EffectivePlatformTargetMetadata {
5
5
  readonly kind: string;
@@ -61,6 +61,7 @@ export interface EffectiveTargetConfig {
61
61
  readonly release: TargetReleaseConfig;
62
62
  readonly features: TargetFeatureConfig;
63
63
  readonly capabilities: TargetCapabilityConfig;
64
+ readonly integrations: TargetIntegrationConfig;
64
65
  readonly policy: TargetPolicyRestrictions;
65
66
  readonly sources: EffectiveTargetConfigSources;
66
67
  readonly monetization: EffectiveMonetizationConfig;
package/dist/effective.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { normalizeTargetIntegrationConfig, } from './runtime.js';
1
2
  export const defaultLeaderboardId = 'default';
2
3
  export function createEffectiveTargetConfig(input) {
3
4
  const products = input.catalog.products.map((product) => createEffectiveProductConfig(input.target, input.config, product));
@@ -14,6 +15,7 @@ export function createEffectiveTargetConfig(input) {
14
15
  release: input.config.release,
15
16
  features: input.config.features,
16
17
  capabilities: input.config.capabilities,
18
+ integrations: normalizeTargetIntegrationConfig(input.config.integrations),
17
19
  policy: input.config.policy,
18
20
  sources: {
19
21
  targetConfig: input.targetConfigVersion,
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import type { EffectiveTargetConfigMatrix } from './effective';
2
- import type { TargetConfigMatrix } from './runtime';
3
- export * from './effective';
4
- export * from './runtime';
5
- export * from './viewport';
1
+ import type { EffectiveTargetConfigMatrix } from './effective.js';
2
+ import type { TargetConfigMatrix } from './runtime.js';
3
+ export * from './effective.js';
4
+ export * from './runtime.js';
5
+ export * from './viewport.js';
6
6
  export declare const assertEffectiveTargetConfigMatrix: (input: unknown) => EffectiveTargetConfigMatrix;
7
7
  export declare const assertTargetConfigMatrix: (input: unknown) => TargetConfigMatrix;
package/dist/index.js CHANGED
@@ -2,20 +2,21 @@ import * as _a from "typia/lib/internal/_assertGuard";
2
2
  import * as _b from "typia/lib/internal/_accessExpressionAsString";
3
3
  const __typia_transform__accessExpressionAsString = _b._accessExpressionAsString;
4
4
  import typia from 'typia';
5
- export * from './effective';
6
- export * from './runtime';
7
- export * from './viewport';
5
+ export * from './effective.js';
6
+ export * from './runtime.js';
7
+ export * from './viewport.js';
8
8
  export const assertEffectiveTargetConfigMatrix = (() => {
9
9
  const _ip0 = input => "string" === typeof input["version"];
10
10
  const _ip1 = input => "boolean" === typeof input["iap"];
11
11
  const _ip2 = input => "boolean" === typeof input["rewardedAds"];
12
12
  const _ip3 = input => "boolean" === typeof input["interstitialAds"];
13
13
  const _ip4 = input => "boolean" === typeof input["localization"];
14
- const _ip5 = input => "boolean" === typeof input["enabled"];
15
- const _ip6 = input => "available" === input["reason"] || "capability-unsupported" === input["reason"] || "missing-platform-id" === input["reason"] || "target-disabled" === input["reason"];
16
- const _ip7 = input => "currency" === input["type"];
17
- const _ip8 = input => "coin" === input["currency"] || "gem" === input["currency"];
18
- const _ip9 = input => "number" === typeof input["amount"];
14
+ const _ip5 = input => "string" === typeof input["id"];
15
+ const _ip6 = input => "boolean" === typeof input["enabled"];
16
+ const _ip7 = input => "available" === input["reason"] || "capability-unsupported" === input["reason"] || "missing-platform-id" === input["reason"] || "target-disabled" === input["reason"];
17
+ const _ip8 = input => "currency" === input["type"];
18
+ const _ip9 = input => "coin" === input["currency"] || "gem" === input["currency"];
19
+ const _ip10 = input => "number" === typeof input["amount"];
19
20
  const _ap0 = (input, _path, _exceptionable = true) => "string" === typeof input["version"] || _a._assertGuard(_exceptionable, {
20
21
  method: "typia.createAssert",
21
22
  path: _path + ".version",
@@ -46,32 +47,38 @@ export const assertEffectiveTargetConfigMatrix = (() => {
46
47
  expected: "boolean",
47
48
  value: input["localization"]
48
49
  }, _errorFactory);
50
+ const _ap5 = (input, _path, _exceptionable = true) => "string" === typeof input["id"] || _a._assertGuard(_exceptionable, {
51
+ method: "typia.createAssert",
52
+ path: _path + ".id",
53
+ expected: "string",
54
+ value: input["id"]
55
+ }, _errorFactory);
49
56
  const _ae0 = "({ readonly type: \"currency\"; readonly currency: \"coin\" | \"gem\"; readonly amount: number; } | { readonly type: \"entitlement\"; readonly entitlement: string; })";
50
- const _ap5 = (input, _path, _exceptionable = true) => "boolean" === typeof input["enabled"] || _a._assertGuard(_exceptionable, {
57
+ const _ap6 = (input, _path, _exceptionable = true) => "boolean" === typeof input["enabled"] || _a._assertGuard(_exceptionable, {
51
58
  method: "typia.createAssert",
52
59
  path: _path + ".enabled",
53
60
  expected: "boolean",
54
61
  value: input["enabled"]
55
62
  }, _errorFactory);
56
- const _ap6 = (input, _path, _exceptionable = true) => "available" === input["reason"] || "capability-unsupported" === input["reason"] || "missing-platform-id" === input["reason"] || "target-disabled" === input["reason"] || _a._assertGuard(_exceptionable, {
63
+ const _ap7 = (input, _path, _exceptionable = true) => "available" === input["reason"] || "capability-unsupported" === input["reason"] || "missing-platform-id" === input["reason"] || "target-disabled" === input["reason"] || _a._assertGuard(_exceptionable, {
57
64
  method: "typia.createAssert",
58
65
  path: _path + ".reason",
59
66
  expected: "(\"available\" | \"capability-unsupported\" | \"missing-platform-id\" | \"target-disabled\")",
60
67
  value: input["reason"]
61
68
  }, _errorFactory);
62
- const _ap7 = (input, _path, _exceptionable = true) => "currency" === input["type"] || _a._assertGuard(_exceptionable, {
69
+ const _ap8 = (input, _path, _exceptionable = true) => "currency" === input["type"] || _a._assertGuard(_exceptionable, {
63
70
  method: "typia.createAssert",
64
71
  path: _path + ".type",
65
72
  expected: "\"currency\"",
66
73
  value: input["type"]
67
74
  }, _errorFactory);
68
- const _ap8 = (input, _path, _exceptionable = true) => "coin" === input["currency"] || "gem" === input["currency"] || _a._assertGuard(_exceptionable, {
75
+ const _ap9 = (input, _path, _exceptionable = true) => "coin" === input["currency"] || "gem" === input["currency"] || _a._assertGuard(_exceptionable, {
69
76
  method: "typia.createAssert",
70
77
  path: _path + ".currency",
71
78
  expected: "(\"coin\" | \"gem\")",
72
79
  value: input["currency"]
73
80
  }, _errorFactory);
74
- const _ap9 = (input, _path, _exceptionable = true) => "number" === typeof input["amount"] || _a._assertGuard(_exceptionable, {
81
+ const _ap10 = (input, _path, _exceptionable = true) => "number" === typeof input["amount"] || _a._assertGuard(_exceptionable, {
75
82
  method: "typia.createAssert",
76
83
  path: _path + ".amount",
77
84
  expected: "number",
@@ -106,8 +113,29 @@ export const assertEffectiveTargetConfigMatrix = (() => {
106
113
  value: value
107
114
  }, _errorFactory);
108
115
  });
109
- const _ao10 = (input, _path, _exceptionable = true) => _ap7(input, _path, true && _exceptionable) && _ap8(input, _path, true && _exceptionable) && _ap9(input, _path, true && _exceptionable);
110
- const _ao11 = (input, _path, _exceptionable = true) => ("entitlement" === input.type || _a._assertGuard(_exceptionable, {
116
+ const _ao10 = (input, _path, _exceptionable = true) => _ap5(input, _path, true && _exceptionable) && ("consumable" === input.type || "non_consumable" === input.type || "subscription" === input.type || _a._assertGuard(_exceptionable, {
117
+ method: "typia.createAssert",
118
+ path: _path + ".type",
119
+ expected: "(\"consumable\" | \"non_consumable\" | \"subscription\")",
120
+ value: input.type
121
+ }, _errorFactory)) && (("object" === typeof input.grant && null !== input.grant || _a._assertGuard(_exceptionable, {
122
+ method: "typia.createAssert",
123
+ path: _path + ".grant",
124
+ expected: _ae0,
125
+ value: input.grant
126
+ }, _errorFactory)) && _au0(input.grant, _path + ".grant", true && _exceptionable) || _a._assertGuard(_exceptionable, {
127
+ method: "typia.createAssert",
128
+ path: _path + ".grant",
129
+ expected: _ae0,
130
+ value: input.grant
131
+ }, _errorFactory)) && _ap6(input, _path, true && _exceptionable) && _ap7(input, _path, true && _exceptionable) && (undefined === input.platformProductId || "string" === typeof input.platformProductId || _a._assertGuard(_exceptionable, {
132
+ method: "typia.createAssert",
133
+ path: _path + ".platformProductId",
134
+ expected: "(string | undefined)",
135
+ value: input.platformProductId
136
+ }, _errorFactory));
137
+ const _ao11 = (input, _path, _exceptionable = true) => _ap8(input, _path, true && _exceptionable) && _ap9(input, _path, true && _exceptionable) && _ap10(input, _path, true && _exceptionable);
138
+ const _ao12 = (input, _path, _exceptionable = true) => ("entitlement" === input.type || _a._assertGuard(_exceptionable, {
111
139
  method: "typia.createAssert",
112
140
  path: _path + ".type",
113
141
  expected: "\"entitlement\"",
@@ -118,7 +146,7 @@ export const assertEffectiveTargetConfigMatrix = (() => {
118
146
  expected: "string",
119
147
  value: input.entitlement
120
148
  }, _errorFactory));
121
- const _ao12 = (input, _path, _exceptionable = true) => _ap2(input, _path, true && _exceptionable) && _ap3(input, _path, true && _exceptionable) && ((Array.isArray(input.placements) || _a._assertGuard(_exceptionable, {
149
+ const _ao13 = (input, _path, _exceptionable = true) => _ap2(input, _path, true && _exceptionable) && _ap3(input, _path, true && _exceptionable) && ((Array.isArray(input.placements) || _a._assertGuard(_exceptionable, {
122
150
  method: "typia.createAssert",
123
151
  path: _path + ".placements",
124
152
  expected: "ReadonlyArray<EffectiveAdPlacementConfig>",
@@ -128,7 +156,7 @@ export const assertEffectiveTargetConfigMatrix = (() => {
128
156
  path: _path + ".placements[" + _index4 + "]",
129
157
  expected: "EffectiveAdPlacementConfig",
130
158
  value: elem
131
- }, _errorFactory)) && _ao13(elem, _path + ".placements[" + _index4 + "]", true && _exceptionable) || _a._assertGuard(_exceptionable, {
159
+ }, _errorFactory)) && _ao14(elem, _path + ".placements[" + _index4 + "]", true && _exceptionable) || _a._assertGuard(_exceptionable, {
132
160
  method: "typia.createAssert",
133
161
  path: _path + ".placements[" + _index4 + "]",
134
162
  expected: "EffectiveAdPlacementConfig",
@@ -139,12 +167,7 @@ export const assertEffectiveTargetConfigMatrix = (() => {
139
167
  expected: "ReadonlyArray<EffectiveAdPlacementConfig>",
140
168
  value: input.placements
141
169
  }, _errorFactory));
142
- const _ao13 = (input, _path, _exceptionable = true) => ("CONTINUE_AFTER_FAIL" === input.id || "STAGE_END_INTERSTITIAL" === input.id || _a._assertGuard(_exceptionable, {
143
- method: "typia.createAssert",
144
- path: _path + ".id",
145
- expected: "(\"CONTINUE_AFTER_FAIL\" | \"STAGE_END_INTERSTITIAL\")",
146
- value: input.id
147
- }, _errorFactory)) && ("interstitial" === input.type || "rewarded" === input.type || _a._assertGuard(_exceptionable, {
170
+ const _ao14 = (input, _path, _exceptionable = true) => _ap5(input, _path, true && _exceptionable) && ("interstitial" === input.type || "rewarded" === input.type || _a._assertGuard(_exceptionable, {
148
171
  method: "typia.createAssert",
149
172
  path: _path + ".type",
150
173
  expected: "(\"interstitial\" | \"rewarded\")",
@@ -164,25 +187,25 @@ export const assertEffectiveTargetConfigMatrix = (() => {
164
187
  path: _path + ".frequencyCap",
165
188
  expected: "FrequencyCap",
166
189
  value: input.frequencyCap
167
- }, _errorFactory)) && _ao16(input.frequencyCap, _path + ".frequencyCap", true && _exceptionable) || _a._assertGuard(_exceptionable, {
190
+ }, _errorFactory)) && _ao17(input.frequencyCap, _path + ".frequencyCap", true && _exceptionable) || _a._assertGuard(_exceptionable, {
168
191
  method: "typia.createAssert",
169
192
  path: _path + ".frequencyCap",
170
193
  expected: "FrequencyCap",
171
194
  value: input.frequencyCap
172
- }, _errorFactory)) && _ap5(input, _path, true && _exceptionable) && _ap6(input, _path, true && _exceptionable) && (undefined === input.platformPlacementId || "string" === typeof input.platformPlacementId || _a._assertGuard(_exceptionable, {
195
+ }, _errorFactory)) && _ap6(input, _path, true && _exceptionable) && _ap7(input, _path, true && _exceptionable) && (undefined === input.platformPlacementId || "string" === typeof input.platformPlacementId || _a._assertGuard(_exceptionable, {
173
196
  method: "typia.createAssert",
174
197
  path: _path + ".platformPlacementId",
175
198
  expected: "(string | undefined)",
176
199
  value: input.platformPlacementId
177
200
  }, _errorFactory));
178
- const _ao14 = (input, _path, _exceptionable = true) => ("continue" === input.type || _a._assertGuard(_exceptionable, {
201
+ const _ao15 = (input, _path, _exceptionable = true) => ("continue" === input.type || _a._assertGuard(_exceptionable, {
179
202
  method: "typia.createAssert",
180
203
  path: _path + ".type",
181
204
  expected: "\"continue\"",
182
205
  value: input.type
183
- }, _errorFactory)) && _ap9(input, _path, true && _exceptionable);
184
- const _ao15 = (input, _path, _exceptionable = true) => _ap7(input, _path, true && _exceptionable) && _ap9(input, _path, true && _exceptionable) && _ap8(input, _path, true && _exceptionable);
185
- const _ao16 = (input, _path, _exceptionable = true) => ("number" === typeof input.cooldownSeconds || _a._assertGuard(_exceptionable, {
206
+ }, _errorFactory)) && _ap10(input, _path, true && _exceptionable);
207
+ const _ao16 = (input, _path, _exceptionable = true) => _ap8(input, _path, true && _exceptionable) && _ap10(input, _path, true && _exceptionable) && _ap9(input, _path, true && _exceptionable);
208
+ const _ao17 = (input, _path, _exceptionable = true) => ("number" === typeof input.cooldownSeconds || _a._assertGuard(_exceptionable, {
186
209
  method: "typia.createAssert",
187
210
  path: _path + ".cooldownSeconds",
188
211
  expected: "number",
@@ -198,12 +221,12 @@ export const assertEffectiveTargetConfigMatrix = (() => {
198
221
  expected: "(number | undefined)",
199
222
  value: input.minStageInterval
200
223
  }, _errorFactory));
201
- const _ao17 = (input, _path, _exceptionable = true) => ("boolean" === typeof input.native || _a._assertGuard(_exceptionable, {
224
+ const _ao18 = (input, _path, _exceptionable = true) => ("boolean" === typeof input.native || _a._assertGuard(_exceptionable, {
202
225
  method: "typia.createAssert",
203
226
  path: _path + ".native",
204
227
  expected: "boolean",
205
228
  value: input.native
206
- }, _errorFactory)) && _ap5(input, _path, true && _exceptionable) && ("available" === input.reason || "capability-unsupported" === input.reason || "target-disabled" === input.reason || _a._assertGuard(_exceptionable, {
229
+ }, _errorFactory)) && _ap6(input, _path, true && _exceptionable) && ("available" === input.reason || "capability-unsupported" === input.reason || "target-disabled" === input.reason || _a._assertGuard(_exceptionable, {
207
230
  method: "typia.createAssert",
208
231
  path: _path + ".reason",
209
232
  expected: "(\"available\" | \"capability-unsupported\" | \"target-disabled\")",
@@ -214,13 +237,12 @@ export const assertEffectiveTargetConfigMatrix = (() => {
214
237
  expected: "(string | undefined)",
215
238
  value: input.defaultLeaderboardId
216
239
  }, _errorFactory));
217
- const _ao18 = (input, _path, _exceptionable = true) => ("local" === input.support || "native" === input.support || "none" === input.support || _a._assertGuard(_exceptionable, {
240
+ const _ao19 = (input, _path, _exceptionable = true) => ("local" === input.support || "native" === input.support || "none" === input.support || _a._assertGuard(_exceptionable, {
218
241
  method: "typia.createAssert",
219
242
  path: _path + ".support",
220
243
  expected: "(\"local\" | \"native\" | \"none\")",
221
244
  value: input.support
222
- }, _errorFactory)) && _ap5(input, _path, true && _exceptionable);
223
- const _ao19 = (input, _path, _exceptionable = true) => _ap5(input, _path, true && _exceptionable);
245
+ }, _errorFactory)) && _ap6(input, _path, true && _exceptionable);
224
246
  const _ao2 = (input, _path, _exceptionable = true) => _ap0(input, _path, true && _exceptionable) && ("string" === typeof input.target || _a._assertGuard(_exceptionable, {
225
247
  method: "typia.createAssert",
226
248
  path: _path + ".target",
@@ -261,12 +283,22 @@ export const assertEffectiveTargetConfigMatrix = (() => {
261
283
  path: _path + ".capabilities",
262
284
  expected: "TargetCapabilityConfig",
263
285
  value: input.capabilities
286
+ }, _errorFactory)) && (("object" === typeof input.integrations && null !== input.integrations || _a._assertGuard(_exceptionable, {
287
+ method: "typia.createAssert",
288
+ path: _path + ".integrations",
289
+ expected: "TargetIntegrationConfig",
290
+ value: input.integrations
291
+ }, _errorFactory)) && _ao6(input.integrations, _path + ".integrations", true && _exceptionable) || _a._assertGuard(_exceptionable, {
292
+ method: "typia.createAssert",
293
+ path: _path + ".integrations",
294
+ expected: "TargetIntegrationConfig",
295
+ value: input.integrations
264
296
  }, _errorFactory)) && (("object" === typeof input.policy && null !== input.policy || _a._assertGuard(_exceptionable, {
265
297
  method: "typia.createAssert",
266
298
  path: _path + ".policy",
267
299
  expected: "TargetPolicyRestrictions",
268
300
  value: input.policy
269
- }, _errorFactory)) && _ao6(input.policy, _path + ".policy", true && _exceptionable) || _a._assertGuard(_exceptionable, {
301
+ }, _errorFactory)) && _ao7(input.policy, _path + ".policy", true && _exceptionable) || _a._assertGuard(_exceptionable, {
270
302
  method: "typia.createAssert",
271
303
  path: _path + ".policy",
272
304
  expected: "TargetPolicyRestrictions",
@@ -276,7 +308,7 @@ export const assertEffectiveTargetConfigMatrix = (() => {
276
308
  path: _path + ".sources",
277
309
  expected: "EffectiveTargetConfigSources",
278
310
  value: input.sources
279
- }, _errorFactory)) && _ao7(input.sources, _path + ".sources", true && _exceptionable) || _a._assertGuard(_exceptionable, {
311
+ }, _errorFactory)) && _ao8(input.sources, _path + ".sources", true && _exceptionable) || _a._assertGuard(_exceptionable, {
280
312
  method: "typia.createAssert",
281
313
  path: _path + ".sources",
282
314
  expected: "EffectiveTargetConfigSources",
@@ -286,7 +318,7 @@ export const assertEffectiveTargetConfigMatrix = (() => {
286
318
  path: _path + ".monetization",
287
319
  expected: "EffectiveMonetizationConfig",
288
320
  value: input.monetization
289
- }, _errorFactory)) && _ao8(input.monetization, _path + ".monetization", true && _exceptionable) || _a._assertGuard(_exceptionable, {
321
+ }, _errorFactory)) && _ao9(input.monetization, _path + ".monetization", true && _exceptionable) || _a._assertGuard(_exceptionable, {
290
322
  method: "typia.createAssert",
291
323
  path: _path + ".monetization",
292
324
  expected: "EffectiveMonetizationConfig",
@@ -296,7 +328,7 @@ export const assertEffectiveTargetConfigMatrix = (() => {
296
328
  path: _path + ".ads",
297
329
  expected: "EffectiveAdsConfig",
298
330
  value: input.ads
299
- }, _errorFactory)) && _ao12(input.ads, _path + ".ads", true && _exceptionable) || _a._assertGuard(_exceptionable, {
331
+ }, _errorFactory)) && _ao13(input.ads, _path + ".ads", true && _exceptionable) || _a._assertGuard(_exceptionable, {
300
332
  method: "typia.createAssert",
301
333
  path: _path + ".ads",
302
334
  expected: "EffectiveAdsConfig",
@@ -306,7 +338,7 @@ export const assertEffectiveTargetConfigMatrix = (() => {
306
338
  path: _path + ".leaderboard",
307
339
  expected: "EffectiveLeaderboardConfig",
308
340
  value: input.leaderboard
309
- }, _errorFactory)) && _ao17(input.leaderboard, _path + ".leaderboard", true && _exceptionable) || _a._assertGuard(_exceptionable, {
341
+ }, _errorFactory)) && _ao18(input.leaderboard, _path + ".leaderboard", true && _exceptionable) || _a._assertGuard(_exceptionable, {
310
342
  method: "typia.createAssert",
311
343
  path: _path + ".leaderboard",
312
344
  expected: "EffectiveLeaderboardConfig",
@@ -316,7 +348,7 @@ export const assertEffectiveTargetConfigMatrix = (() => {
316
348
  path: _path + ".storage",
317
349
  expected: "EffectiveStorageConfig",
318
350
  value: input.storage
319
- }, _errorFactory)) && _ao18(input.storage, _path + ".storage", true && _exceptionable) || _a._assertGuard(_exceptionable, {
351
+ }, _errorFactory)) && _ao19(input.storage, _path + ".storage", true && _exceptionable) || _a._assertGuard(_exceptionable, {
320
352
  method: "typia.createAssert",
321
353
  path: _path + ".storage",
322
354
  expected: "EffectiveStorageConfig",
@@ -326,12 +358,13 @@ export const assertEffectiveTargetConfigMatrix = (() => {
326
358
  path: _path + ".localization",
327
359
  expected: "EffectiveLocalizationConfig",
328
360
  value: input.localization
329
- }, _errorFactory)) && _ao19(input.localization, _path + ".localization", true && _exceptionable) || _a._assertGuard(_exceptionable, {
361
+ }, _errorFactory)) && _ao20(input.localization, _path + ".localization", true && _exceptionable) || _a._assertGuard(_exceptionable, {
330
362
  method: "typia.createAssert",
331
363
  path: _path + ".localization",
332
364
  expected: "EffectiveLocalizationConfig",
333
365
  value: input.localization
334
366
  }, _errorFactory));
367
+ const _ao20 = (input, _path, _exceptionable = true) => _ap6(input, _path, true && _exceptionable);
335
368
  const _ao3 = (input, _path, _exceptionable = true) => "app-store" === input.profile || "apps-in-toss" === input.profile || "devvit" === input.profile || "google-play" === input.profile || "microsoft-store" === input.profile || "web-preview" === input.profile || _a._assertGuard(_exceptionable, {
336
369
  method: "typia.createAssert",
337
370
  path: _path + ".profile",
@@ -350,7 +383,38 @@ export const assertEffectiveTargetConfigMatrix = (() => {
350
383
  expected: "(\"local\" | \"native\" | \"none\")",
351
384
  value: input.storage
352
385
  }, _errorFactory)) && _ap4(input, _path, true && _exceptionable);
353
- const _ao6 = (input, _path, _exceptionable = true) => ("boolean" === typeof input.externalPaymentAllowed || _a._assertGuard(_exceptionable, {
386
+ const _ao6 = (input, _path, _exceptionable = true) => ("approval-required" === input.identityUpgrade || "available" === input.identityUpgrade || "configuration-required" === input.identityUpgrade || "disabled" === input.identityUpgrade || "unsupported" === input.identityUpgrade || _a._assertGuard(_exceptionable, {
387
+ method: "typia.createAssert",
388
+ path: _path + ".identityUpgrade",
389
+ expected: "(\"approval-required\" | \"available\" | \"configuration-required\" | \"disabled\" | \"unsupported\")",
390
+ value: input.identityUpgrade
391
+ }, _errorFactory)) && ("approval-required" === input.presentation || "available" === input.presentation || "configuration-required" === input.presentation || "disabled" === input.presentation || "unsupported" === input.presentation || _a._assertGuard(_exceptionable, {
392
+ method: "typia.createAssert",
393
+ path: _path + ".presentation",
394
+ expected: "(\"approval-required\" | \"available\" | \"configuration-required\" | \"disabled\" | \"unsupported\")",
395
+ value: input.presentation
396
+ }, _errorFactory)) && ("approval-required" === input.sharing || "available" === input.sharing || "configuration-required" === input.sharing || "disabled" === input.sharing || "unsupported" === input.sharing || _a._assertGuard(_exceptionable, {
397
+ method: "typia.createAssert",
398
+ path: _path + ".sharing",
399
+ expected: "(\"approval-required\" | \"available\" | \"configuration-required\" | \"disabled\" | \"unsupported\")",
400
+ value: input.sharing
401
+ }, _errorFactory)) && ("approval-required" === input.inboundShare || "available" === input.inboundShare || "configuration-required" === input.inboundShare || "disabled" === input.inboundShare || "unsupported" === input.inboundShare || _a._assertGuard(_exceptionable, {
402
+ method: "typia.createAssert",
403
+ path: _path + ".inboundShare",
404
+ expected: "(\"approval-required\" | \"available\" | \"configuration-required\" | \"disabled\" | \"unsupported\")",
405
+ value: input.inboundShare
406
+ }, _errorFactory)) && ("approval-required" === input.notifications || "available" === input.notifications || "configuration-required" === input.notifications || "disabled" === input.notifications || "unsupported" === input.notifications || _a._assertGuard(_exceptionable, {
407
+ method: "typia.createAssert",
408
+ path: _path + ".notifications",
409
+ expected: "(\"approval-required\" | \"available\" | \"configuration-required\" | \"disabled\" | \"unsupported\")",
410
+ value: input.notifications
411
+ }, _errorFactory)) && ("fullscreen" === input.presentationMode || "inline-expanded" === input.presentationMode || _a._assertGuard(_exceptionable, {
412
+ method: "typia.createAssert",
413
+ path: _path + ".presentationMode",
414
+ expected: "(\"fullscreen\" | \"inline-expanded\")",
415
+ value: input.presentationMode
416
+ }, _errorFactory));
417
+ const _ao7 = (input, _path, _exceptionable = true) => ("boolean" === typeof input.externalPaymentAllowed || _a._assertGuard(_exceptionable, {
354
418
  method: "typia.createAssert",
355
419
  path: _path + ".externalPaymentAllowed",
356
420
  expected: "boolean",
@@ -376,7 +440,7 @@ export const assertEffectiveTargetConfigMatrix = (() => {
376
440
  expected: "boolean",
377
441
  value: input.requiresAitReview
378
442
  }, _errorFactory));
379
- const _ao7 = (input, _path, _exceptionable = true) => ("string" === typeof input.targetConfig || _a._assertGuard(_exceptionable, {
443
+ const _ao8 = (input, _path, _exceptionable = true) => ("string" === typeof input.targetConfig || _a._assertGuard(_exceptionable, {
380
444
  method: "typia.createAssert",
381
445
  path: _path + ".targetConfig",
382
446
  expected: "string",
@@ -402,7 +466,7 @@ export const assertEffectiveTargetConfigMatrix = (() => {
402
466
  expected: "(string | undefined)",
403
467
  value: input.platformAdapter
404
468
  }, _errorFactory));
405
- const _ao8 = (input, _path, _exceptionable = true) => _ap1(input, _path, true && _exceptionable) && ((Array.isArray(input.products) || _a._assertGuard(_exceptionable, {
469
+ const _ao9 = (input, _path, _exceptionable = true) => _ap1(input, _path, true && _exceptionable) && ((Array.isArray(input.products) || _a._assertGuard(_exceptionable, {
406
470
  method: "typia.createAssert",
407
471
  path: _path + ".products",
408
472
  expected: "ReadonlyArray<EffectiveProductConfig>",
@@ -412,7 +476,7 @@ export const assertEffectiveTargetConfigMatrix = (() => {
412
476
  path: _path + ".products[" + _index3 + "]",
413
477
  expected: "EffectiveProductConfig",
414
478
  value: elem
415
- }, _errorFactory)) && _ao9(elem, _path + ".products[" + _index3 + "]", true && _exceptionable) || _a._assertGuard(_exceptionable, {
479
+ }, _errorFactory)) && _ao10(elem, _path + ".products[" + _index3 + "]", true && _exceptionable) || _a._assertGuard(_exceptionable, {
416
480
  method: "typia.createAssert",
417
481
  path: _path + ".products[" + _index3 + "]",
418
482
  expected: "EffectiveProductConfig",
@@ -423,37 +487,11 @@ export const assertEffectiveTargetConfigMatrix = (() => {
423
487
  expected: "ReadonlyArray<EffectiveProductConfig>",
424
488
  value: input.products
425
489
  }, _errorFactory));
426
- const _ao9 = (input, _path, _exceptionable = true) => ("COINS_100" === input.id || "COINS_500" === input.id || "REMOVE_ADS" === input.id || _a._assertGuard(_exceptionable, {
427
- method: "typia.createAssert",
428
- path: _path + ".id",
429
- expected: "(\"COINS_100\" | \"COINS_500\" | \"REMOVE_ADS\")",
430
- value: input.id
431
- }, _errorFactory)) && ("consumable" === input.type || "non_consumable" === input.type || "subscription" === input.type || _a._assertGuard(_exceptionable, {
432
- method: "typia.createAssert",
433
- path: _path + ".type",
434
- expected: "(\"consumable\" | \"non_consumable\" | \"subscription\")",
435
- value: input.type
436
- }, _errorFactory)) && (("object" === typeof input.grant && null !== input.grant || _a._assertGuard(_exceptionable, {
437
- method: "typia.createAssert",
438
- path: _path + ".grant",
439
- expected: _ae0,
440
- value: input.grant
441
- }, _errorFactory)) && _au0(input.grant, _path + ".grant", true && _exceptionable) || _a._assertGuard(_exceptionable, {
442
- method: "typia.createAssert",
443
- path: _path + ".grant",
444
- expected: _ae0,
445
- value: input.grant
446
- }, _errorFactory)) && _ap5(input, _path, true && _exceptionable) && _ap6(input, _path, true && _exceptionable) && (undefined === input.platformProductId || "string" === typeof input.platformProductId || _a._assertGuard(_exceptionable, {
447
- method: "typia.createAssert",
448
- path: _path + ".platformProductId",
449
- expected: "(string | undefined)",
450
- value: input.platformProductId
451
- }, _errorFactory));
452
490
  const _au0 = (input, _path, _exceptionable = true) => (() => {
453
491
  if ("currency" === input.type)
454
- return _ao10(input, _path, true && _exceptionable);
455
- else if ("entitlement" === input.type)
456
492
  return _ao11(input, _path, true && _exceptionable);
493
+ else if ("entitlement" === input.type)
494
+ return _ao12(input, _path, true && _exceptionable);
457
495
  else
458
496
  return _a._assertGuard(_exceptionable, {
459
497
  method: "typia.createAssert",
@@ -464,9 +502,9 @@ export const assertEffectiveTargetConfigMatrix = (() => {
464
502
  })();
465
503
  const _au1 = (input, _path, _exceptionable = true) => (() => {
466
504
  if ("continue" === input.type)
467
- return _ao14(input, _path, true && _exceptionable);
468
- else if ("currency" === input.type)
469
505
  return _ao15(input, _path, true && _exceptionable);
506
+ else if ("currency" === input.type)
507
+ return _ao16(input, _path, true && _exceptionable);
470
508
  else
471
509
  return _a._assertGuard(_exceptionable, {
472
510
  method: "typia.createAssert",
@@ -482,37 +520,38 @@ export const assertEffectiveTargetConfigMatrix = (() => {
482
520
  return true;
483
521
  return "object" === typeof value && null !== value && _io2(value);
484
522
  });
485
- const _io10 = input => _ip7(input) && _ip8(input) && _ip9(input);
486
- const _io11 = input => "entitlement" === input.type && "string" === typeof input.entitlement;
487
- const _io12 = input => _ip2(input) && _ip3(input) && (Array.isArray(input.placements) && input.placements.every(elem => "object" === typeof elem && null !== elem && _io13(elem)));
488
- const _io13 = input => ("CONTINUE_AFTER_FAIL" === input.id || "STAGE_END_INTERSTITIAL" === input.id) && ("interstitial" === input.type || "rewarded" === input.type) && (undefined === input.reward || "object" === typeof input.reward && null !== input.reward && _iu1(input.reward)) && ("object" === typeof input.frequencyCap && null !== input.frequencyCap && _io16(input.frequencyCap)) && _ip5(input) && _ip6(input) && (undefined === input.platformPlacementId || "string" === typeof input.platformPlacementId);
489
- const _io14 = input => "continue" === input.type && _ip9(input);
490
- const _io15 = input => _ip7(input) && _ip9(input) && _ip8(input);
491
- const _io16 = input => "number" === typeof input.cooldownSeconds && (undefined === input.maxPerSession || "number" === typeof input.maxPerSession) && (undefined === input.minStageInterval || "number" === typeof input.minStageInterval);
492
- const _io17 = input => "boolean" === typeof input.native && _ip5(input) && ("available" === input.reason || "capability-unsupported" === input.reason || "target-disabled" === input.reason) && (undefined === input.defaultLeaderboardId || "string" === typeof input.defaultLeaderboardId);
493
- const _io18 = input => ("local" === input.support || "native" === input.support || "none" === input.support) && _ip5(input);
494
- const _io19 = input => _ip5(input);
495
- const _io2 = input => _ip0(input) && "string" === typeof input.target && ("apps-in-toss" === input.runtime || "capacitor-android" === input.runtime || "capacitor-ios" === input.runtime || "devvit-web" === input.runtime || "microsoft-store-pwa" === input.runtime || "web-preview" === input.runtime) && ("object" === typeof input.release && null !== input.release && _io3(input.release)) && ("object" === typeof input.features && null !== input.features && _io4(input.features)) && ("object" === typeof input.capabilities && null !== input.capabilities && _io5(input.capabilities)) && ("object" === typeof input.policy && null !== input.policy && _io6(input.policy)) && ("object" === typeof input.sources && null !== input.sources && _io7(input.sources)) && ("object" === typeof input.monetization && null !== input.monetization && _io8(input.monetization)) && ("object" === typeof input.ads && null !== input.ads && _io12(input.ads)) && ("object" === typeof input.leaderboard && null !== input.leaderboard && _io17(input.leaderboard)) && ("object" === typeof input.storage && null !== input.storage && _io18(input.storage)) && ("object" === typeof input.localization && null !== input.localization && _io19(input.localization));
523
+ const _io10 = input => _ip5(input) && ("consumable" === input.type || "non_consumable" === input.type || "subscription" === input.type) && ("object" === typeof input.grant && null !== input.grant && _iu0(input.grant)) && _ip6(input) && _ip7(input) && (undefined === input.platformProductId || "string" === typeof input.platformProductId);
524
+ const _io11 = input => _ip8(input) && _ip9(input) && _ip10(input);
525
+ const _io12 = input => "entitlement" === input.type && "string" === typeof input.entitlement;
526
+ const _io13 = input => _ip2(input) && _ip3(input) && (Array.isArray(input.placements) && input.placements.every(elem => "object" === typeof elem && null !== elem && _io14(elem)));
527
+ const _io14 = input => _ip5(input) && ("interstitial" === input.type || "rewarded" === input.type) && (undefined === input.reward || "object" === typeof input.reward && null !== input.reward && _iu1(input.reward)) && ("object" === typeof input.frequencyCap && null !== input.frequencyCap && _io17(input.frequencyCap)) && _ip6(input) && _ip7(input) && (undefined === input.platformPlacementId || "string" === typeof input.platformPlacementId);
528
+ const _io15 = input => "continue" === input.type && _ip10(input);
529
+ const _io16 = input => _ip8(input) && _ip10(input) && _ip9(input);
530
+ const _io17 = input => "number" === typeof input.cooldownSeconds && (undefined === input.maxPerSession || "number" === typeof input.maxPerSession) && (undefined === input.minStageInterval || "number" === typeof input.minStageInterval);
531
+ const _io18 = input => "boolean" === typeof input.native && _ip6(input) && ("available" === input.reason || "capability-unsupported" === input.reason || "target-disabled" === input.reason) && (undefined === input.defaultLeaderboardId || "string" === typeof input.defaultLeaderboardId);
532
+ const _io19 = input => ("local" === input.support || "native" === input.support || "none" === input.support) && _ip6(input);
533
+ const _io2 = input => _ip0(input) && "string" === typeof input.target && ("apps-in-toss" === input.runtime || "capacitor-android" === input.runtime || "capacitor-ios" === input.runtime || "devvit-web" === input.runtime || "microsoft-store-pwa" === input.runtime || "web-preview" === input.runtime) && ("object" === typeof input.release && null !== input.release && _io3(input.release)) && ("object" === typeof input.features && null !== input.features && _io4(input.features)) && ("object" === typeof input.capabilities && null !== input.capabilities && _io5(input.capabilities)) && ("object" === typeof input.integrations && null !== input.integrations && _io6(input.integrations)) && ("object" === typeof input.policy && null !== input.policy && _io7(input.policy)) && ("object" === typeof input.sources && null !== input.sources && _io8(input.sources)) && ("object" === typeof input.monetization && null !== input.monetization && _io9(input.monetization)) && ("object" === typeof input.ads && null !== input.ads && _io13(input.ads)) && ("object" === typeof input.leaderboard && null !== input.leaderboard && _io18(input.leaderboard)) && ("object" === typeof input.storage && null !== input.storage && _io19(input.storage)) && ("object" === typeof input.localization && null !== input.localization && _io20(input.localization));
534
+ const _io20 = input => _ip6(input);
496
535
  const _io3 = input => "app-store" === input.profile || "apps-in-toss" === input.profile || "devvit" === input.profile || "google-play" === input.profile || "microsoft-store" === input.profile || "web-preview" === input.profile;
497
536
  const _io4 = input => _ip1(input) && _ip2(input) && _ip3(input) && "boolean" === typeof input.leaderboard && _ip4(input);
498
537
  const _io5 = input => ("local" === input.storage || "native" === input.storage || "none" === input.storage) && _ip4(input);
499
- const _io6 = input => "boolean" === typeof input.externalPaymentAllowed && "boolean" === typeof input.remoteExecutableCodeAllowed && "boolean" === typeof input.installOtherAppCTAAllowed && "boolean" === typeof input.requiresStoreReview && "boolean" === typeof input.requiresAitReview;
500
- const _io7 = input => "string" === typeof input.targetConfig && "string" === typeof input.productCatalog && "string" === typeof input.adPlacements && (undefined === input.platformTargetKind || "string" === typeof input.platformTargetKind) && (undefined === input.platformAdapter || "string" === typeof input.platformAdapter);
501
- const _io8 = input => _ip1(input) && (Array.isArray(input.products) && input.products.every(elem => "object" === typeof elem && null !== elem && _io9(elem)));
502
- const _io9 = input => ("COINS_100" === input.id || "COINS_500" === input.id || "REMOVE_ADS" === input.id) && ("consumable" === input.type || "non_consumable" === input.type || "subscription" === input.type) && ("object" === typeof input.grant && null !== input.grant && _iu0(input.grant)) && _ip5(input) && _ip6(input) && (undefined === input.platformProductId || "string" === typeof input.platformProductId);
538
+ const _io6 = input => ("approval-required" === input.identityUpgrade || "available" === input.identityUpgrade || "configuration-required" === input.identityUpgrade || "disabled" === input.identityUpgrade || "unsupported" === input.identityUpgrade) && ("approval-required" === input.presentation || "available" === input.presentation || "configuration-required" === input.presentation || "disabled" === input.presentation || "unsupported" === input.presentation) && ("approval-required" === input.sharing || "available" === input.sharing || "configuration-required" === input.sharing || "disabled" === input.sharing || "unsupported" === input.sharing) && ("approval-required" === input.inboundShare || "available" === input.inboundShare || "configuration-required" === input.inboundShare || "disabled" === input.inboundShare || "unsupported" === input.inboundShare) && ("approval-required" === input.notifications || "available" === input.notifications || "configuration-required" === input.notifications || "disabled" === input.notifications || "unsupported" === input.notifications) && ("fullscreen" === input.presentationMode || "inline-expanded" === input.presentationMode);
539
+ const _io7 = input => "boolean" === typeof input.externalPaymentAllowed && "boolean" === typeof input.remoteExecutableCodeAllowed && "boolean" === typeof input.installOtherAppCTAAllowed && "boolean" === typeof input.requiresStoreReview && "boolean" === typeof input.requiresAitReview;
540
+ const _io8 = input => "string" === typeof input.targetConfig && "string" === typeof input.productCatalog && "string" === typeof input.adPlacements && (undefined === input.platformTargetKind || "string" === typeof input.platformTargetKind) && (undefined === input.platformAdapter || "string" === typeof input.platformAdapter);
541
+ const _io9 = input => _ip1(input) && (Array.isArray(input.products) && input.products.every(elem => "object" === typeof elem && null !== elem && _io10(elem)));
503
542
  const _iu0 = input => (() => {
504
543
  if ("currency" === input.type)
505
- return _io10(input);
506
- else if ("entitlement" === input.type)
507
544
  return _io11(input);
545
+ else if ("entitlement" === input.type)
546
+ return _io12(input);
508
547
  else
509
548
  return false;
510
549
  })();
511
550
  const _iu1 = input => (() => {
512
551
  if ("continue" === input.type)
513
- return _io14(input);
514
- else if ("currency" === input.type)
515
552
  return _io15(input);
553
+ else if ("currency" === input.type)
554
+ return _io16(input);
516
555
  else
517
556
  return false;
518
557
  })();
@@ -662,6 +701,16 @@ export const assertTargetConfigMatrix = (() => {
662
701
  path: _path + ".policy",
663
702
  expected: "TargetPolicyRestrictions",
664
703
  value: input.policy
704
+ }, _errorFactory)) && (undefined === input.integrations || ("object" === typeof input.integrations && null !== input.integrations || _a._assertGuard(_exceptionable, {
705
+ method: "typia.createAssert",
706
+ path: _path + ".integrations",
707
+ expected: "(TargetIntegrationConfig | undefined)",
708
+ value: input.integrations
709
+ }, _errorFactory)) && _ao9(input.integrations, _path + ".integrations", true && _exceptionable) || _a._assertGuard(_exceptionable, {
710
+ method: "typia.createAssert",
711
+ path: _path + ".integrations",
712
+ expected: "(TargetIntegrationConfig | undefined)",
713
+ value: input.integrations
665
714
  }, _errorFactory));
666
715
  const _ao3 = (input, _path, _exceptionable = true) => _ap0(input, _path, true && _exceptionable) && _ap1(input, _path, true && _exceptionable) && _ap2(input, _path, true && _exceptionable) && ("boolean" === typeof input.leaderboard || _a._assertGuard(_exceptionable, {
667
716
  method: "typia.createAssert",
@@ -714,6 +763,37 @@ export const assertTargetConfigMatrix = (() => {
714
763
  expected: "boolean",
715
764
  value: input.requiresAitReview
716
765
  }, _errorFactory));
766
+ const _ao9 = (input, _path, _exceptionable = true) => ("approval-required" === input.identityUpgrade || "available" === input.identityUpgrade || "configuration-required" === input.identityUpgrade || "disabled" === input.identityUpgrade || "unsupported" === input.identityUpgrade || _a._assertGuard(_exceptionable, {
767
+ method: "typia.createAssert",
768
+ path: _path + ".identityUpgrade",
769
+ expected: "(\"approval-required\" | \"available\" | \"configuration-required\" | \"disabled\" | \"unsupported\")",
770
+ value: input.identityUpgrade
771
+ }, _errorFactory)) && ("approval-required" === input.presentation || "available" === input.presentation || "configuration-required" === input.presentation || "disabled" === input.presentation || "unsupported" === input.presentation || _a._assertGuard(_exceptionable, {
772
+ method: "typia.createAssert",
773
+ path: _path + ".presentation",
774
+ expected: "(\"approval-required\" | \"available\" | \"configuration-required\" | \"disabled\" | \"unsupported\")",
775
+ value: input.presentation
776
+ }, _errorFactory)) && ("approval-required" === input.sharing || "available" === input.sharing || "configuration-required" === input.sharing || "disabled" === input.sharing || "unsupported" === input.sharing || _a._assertGuard(_exceptionable, {
777
+ method: "typia.createAssert",
778
+ path: _path + ".sharing",
779
+ expected: "(\"approval-required\" | \"available\" | \"configuration-required\" | \"disabled\" | \"unsupported\")",
780
+ value: input.sharing
781
+ }, _errorFactory)) && ("approval-required" === input.inboundShare || "available" === input.inboundShare || "configuration-required" === input.inboundShare || "disabled" === input.inboundShare || "unsupported" === input.inboundShare || _a._assertGuard(_exceptionable, {
782
+ method: "typia.createAssert",
783
+ path: _path + ".inboundShare",
784
+ expected: "(\"approval-required\" | \"available\" | \"configuration-required\" | \"disabled\" | \"unsupported\")",
785
+ value: input.inboundShare
786
+ }, _errorFactory)) && ("approval-required" === input.notifications || "available" === input.notifications || "configuration-required" === input.notifications || "disabled" === input.notifications || "unsupported" === input.notifications || _a._assertGuard(_exceptionable, {
787
+ method: "typia.createAssert",
788
+ path: _path + ".notifications",
789
+ expected: "(\"approval-required\" | \"available\" | \"configuration-required\" | \"disabled\" | \"unsupported\")",
790
+ value: input.notifications
791
+ }, _errorFactory)) && ("fullscreen" === input.presentationMode || "inline-expanded" === input.presentationMode || _a._assertGuard(_exceptionable, {
792
+ method: "typia.createAssert",
793
+ path: _path + ".presentationMode",
794
+ expected: "(\"fullscreen\" | \"inline-expanded\")",
795
+ value: input.presentationMode
796
+ }, _errorFactory));
717
797
  const _io0 = input => "string" === typeof input.version && ("object" === typeof input.targets && null !== input.targets && false === Array.isArray(input.targets) && _io1(input.targets));
718
798
  const _io1 = input => Object.keys(input).every(key => {
719
799
  const value = input[key];
@@ -721,13 +801,14 @@ export const assertTargetConfigMatrix = (() => {
721
801
  return true;
722
802
  return "object" === typeof value && null !== value && _io2(value);
723
803
  });
724
- const _io2 = input => ("apps-in-toss" === input.runtime || "capacitor-android" === input.runtime || "capacitor-ios" === input.runtime || "devvit-web" === input.runtime || "microsoft-store-pwa" === input.runtime || "web-preview" === input.runtime) && ("object" === typeof input.features && null !== input.features && _io3(input.features)) && ("object" === typeof input.capabilities && null !== input.capabilities && _io4(input.capabilities)) && ("object" === typeof input.monetization && null !== input.monetization && _io5(input.monetization)) && ("object" === typeof input.leaderboard && null !== input.leaderboard && _io6(input.leaderboard)) && ("object" === typeof input.release && null !== input.release && _io7(input.release)) && ("object" === typeof input.policy && null !== input.policy && _io8(input.policy));
804
+ const _io2 = input => ("apps-in-toss" === input.runtime || "capacitor-android" === input.runtime || "capacitor-ios" === input.runtime || "devvit-web" === input.runtime || "microsoft-store-pwa" === input.runtime || "web-preview" === input.runtime) && ("object" === typeof input.features && null !== input.features && _io3(input.features)) && ("object" === typeof input.capabilities && null !== input.capabilities && _io4(input.capabilities)) && ("object" === typeof input.monetization && null !== input.monetization && _io5(input.monetization)) && ("object" === typeof input.leaderboard && null !== input.leaderboard && _io6(input.leaderboard)) && ("object" === typeof input.release && null !== input.release && _io7(input.release)) && ("object" === typeof input.policy && null !== input.policy && _io8(input.policy)) && (undefined === input.integrations || "object" === typeof input.integrations && null !== input.integrations && _io9(input.integrations));
725
805
  const _io3 = input => _ip0(input) && _ip1(input) && _ip2(input) && "boolean" === typeof input.leaderboard && _ip3(input);
726
806
  const _io4 = input => ("local" === input.storage || "native" === input.storage || "none" === input.storage) && _ip3(input);
727
807
  const _io5 = input => _ip0(input) && _ip1(input) && _ip2(input);
728
808
  const _io6 = input => "boolean" === typeof input.native;
729
809
  const _io7 = input => "app-store" === input.profile || "apps-in-toss" === input.profile || "devvit" === input.profile || "google-play" === input.profile || "microsoft-store" === input.profile || "web-preview" === input.profile;
730
810
  const _io8 = input => "boolean" === typeof input.externalPaymentAllowed && "boolean" === typeof input.remoteExecutableCodeAllowed && "boolean" === typeof input.installOtherAppCTAAllowed && "boolean" === typeof input.requiresStoreReview && "boolean" === typeof input.requiresAitReview;
811
+ const _io9 = input => ("approval-required" === input.identityUpgrade || "available" === input.identityUpgrade || "configuration-required" === input.identityUpgrade || "disabled" === input.identityUpgrade || "unsupported" === input.identityUpgrade) && ("approval-required" === input.presentation || "available" === input.presentation || "configuration-required" === input.presentation || "disabled" === input.presentation || "unsupported" === input.presentation) && ("approval-required" === input.sharing || "available" === input.sharing || "configuration-required" === input.sharing || "disabled" === input.sharing || "unsupported" === input.sharing) && ("approval-required" === input.inboundShare || "available" === input.inboundShare || "configuration-required" === input.inboundShare || "disabled" === input.inboundShare || "unsupported" === input.inboundShare) && ("approval-required" === input.notifications || "available" === input.notifications || "configuration-required" === input.notifications || "disabled" === input.notifications || "unsupported" === input.notifications) && ("fullscreen" === input.presentationMode || "inline-expanded" === input.presentationMode);
731
812
  const __is = input => "object" === typeof input && null !== input && _io0(input);
732
813
  let _errorFactory;
733
814
  return (input, errorFactory) => {
package/dist/runtime.d.ts CHANGED
@@ -1,11 +1,22 @@
1
1
  import type { PlatformCapabilities, PlatformGateway } from '@mpgd/platform';
2
- import type { EffectiveTargetConfig } from './effective';
2
+ import type { EffectiveTargetConfig } from './effective.js';
3
3
  export type PlatformFeature = 'iap' | 'rewardedAds' | 'interstitialAds' | 'leaderboard' | 'localization';
4
4
  export type AdPlacementType = 'rewarded' | 'interstitial';
5
5
  type PlatformConfigTarget = PlatformGateway['target'];
6
6
  export type TargetRuntimeKind = 'web-preview' | 'microsoft-store-pwa' | 'capacitor-android' | 'capacitor-ios' | 'apps-in-toss' | 'devvit-web';
7
7
  export type ReleaseProfile = 'web-preview' | 'microsoft-store' | 'google-play' | 'app-store' | 'apps-in-toss' | 'devvit';
8
8
  export type StorageSupport = 'local' | 'native' | 'none';
9
+ export type TargetIntegration = 'identityUpgrade' | 'presentation' | 'sharing' | 'inboundShare' | 'notifications';
10
+ export type IntegrationAvailabilityState = 'available' | 'disabled' | 'approval-required' | 'configuration-required' | 'unsupported';
11
+ export type PresentationMode = 'fullscreen' | 'inline-expanded';
12
+ export interface TargetIntegrationConfig {
13
+ readonly identityUpgrade: IntegrationAvailabilityState;
14
+ readonly presentation: IntegrationAvailabilityState;
15
+ readonly sharing: IntegrationAvailabilityState;
16
+ readonly inboundShare: IntegrationAvailabilityState;
17
+ readonly notifications: IntegrationAvailabilityState;
18
+ readonly presentationMode: PresentationMode;
19
+ }
9
20
  export interface TargetFeatureConfig {
10
21
  readonly iap: boolean;
11
22
  readonly rewardedAds: boolean;
@@ -43,6 +54,7 @@ export interface TargetConfig {
43
54
  readonly leaderboard: TargetLeaderboardConfig;
44
55
  readonly release: TargetReleaseConfig;
45
56
  readonly policy: TargetPolicyRestrictions;
57
+ readonly integrations?: TargetIntegrationConfig;
46
58
  }
47
59
  export interface TargetConfigMatrix {
48
60
  readonly version: string;
@@ -66,13 +78,21 @@ export interface AdPlacementAvailability {
66
78
  readonly enabled: boolean;
67
79
  readonly reason: FeatureAvailabilityReason;
68
80
  }
81
+ export interface IntegrationAvailability {
82
+ readonly integration: TargetIntegration;
83
+ readonly state: IntegrationAvailabilityState;
84
+ readonly configuredState: IntegrationAvailabilityState;
85
+ readonly adapterSupported: boolean;
86
+ }
69
87
  export interface TargetRuntimeSnapshot {
70
88
  readonly target: PlatformConfigTarget;
71
89
  readonly configTarget: string;
72
90
  readonly config: TargetConfig;
73
91
  readonly effectiveConfig?: EffectiveTargetConfig;
92
+ readonly presentationMode: PresentationMode;
74
93
  readonly capabilities: PlatformCapabilities;
75
94
  readonly features: Record<PlatformFeature, FeatureAvailability>;
95
+ readonly integrations: Record<TargetIntegration, IntegrationAvailability>;
76
96
  readonly adPlacements: readonly AdPlacementAvailability[];
77
97
  }
78
98
  export interface TargetAvailabilityOptions {
@@ -88,11 +108,22 @@ export interface TargetConfiguredGateway extends PlatformGateway {
88
108
  getTargetRuntime(): Promise<TargetRuntimeSnapshot>;
89
109
  }
90
110
  export declare const platformFeatures: readonly ["iap", "rewardedAds", "interstitialAds", "leaderboard", "localization"];
111
+ export declare const targetIntegrations: readonly ["identityUpgrade", "presentation", "sharing", "inboundShare", "notifications"];
112
+ export declare const defaultTargetIntegrationConfig: {
113
+ readonly identityUpgrade: 'disabled';
114
+ readonly presentation: 'disabled';
115
+ readonly sharing: 'disabled';
116
+ readonly inboundShare: 'disabled';
117
+ readonly notifications: 'unsupported';
118
+ readonly presentationMode: 'fullscreen';
119
+ };
120
+ export declare function normalizeTargetIntegrationConfig(config: Partial<TargetIntegrationConfig> | undefined): TargetIntegrationConfig;
91
121
  export declare function targetConfigKeyForPlatform(target: PlatformConfigTarget): string;
92
122
  export declare function getTargetConfig(matrix: TargetConfigMatrix, target: PlatformConfigTarget | string): TargetConfig;
93
123
  export declare function isPlatformFeatureEnabled(config: TargetConfig, feature: PlatformFeature): boolean;
94
124
  export declare function applyTargetConfigToCapabilities(capabilities: PlatformCapabilities, config: TargetConfig): PlatformCapabilities;
95
125
  export declare function getFeatureAvailability(feature: PlatformFeature, config: TargetConfig, capabilities: PlatformCapabilities): FeatureAvailability;
126
+ export declare function getIntegrationAvailability(integration: TargetIntegration, config: TargetConfig, gateway?: PlatformGateway): IntegrationAvailability;
96
127
  export declare function createTargetRuntimeSnapshot(input: {
97
128
  readonly target: PlatformConfigTarget;
98
129
  readonly configTarget?: string;
@@ -100,6 +131,7 @@ export declare function createTargetRuntimeSnapshot(input: {
100
131
  readonly effectiveConfig?: EffectiveTargetConfig;
101
132
  readonly capabilities: PlatformCapabilities;
102
133
  readonly adPlacements?: readonly AdPlacementDefinition[];
134
+ readonly gateway?: PlatformGateway;
103
135
  }): TargetRuntimeSnapshot;
104
136
  export declare function withTargetAvailability(gateway: PlatformGateway, config: TargetConfig, options?: TargetAvailabilityOptions): TargetConfiguredGateway;
105
137
  export declare function isTargetConfiguredGateway(gateway: PlatformGateway): gateway is TargetConfiguredGateway;
package/dist/runtime.js CHANGED
@@ -5,6 +5,41 @@ export const platformFeatures = [
5
5
  'leaderboard',
6
6
  'localization',
7
7
  ];
8
+ export const targetIntegrations = [
9
+ 'identityUpgrade',
10
+ 'presentation',
11
+ 'sharing',
12
+ 'inboundShare',
13
+ 'notifications',
14
+ ];
15
+ export const defaultTargetIntegrationConfig = {
16
+ identityUpgrade: 'disabled',
17
+ presentation: 'disabled',
18
+ sharing: 'disabled',
19
+ inboundShare: 'disabled',
20
+ notifications: 'unsupported',
21
+ presentationMode: 'fullscreen',
22
+ };
23
+ const integrationAvailabilityStates = new Set([
24
+ 'available',
25
+ 'disabled',
26
+ 'approval-required',
27
+ 'configuration-required',
28
+ 'unsupported',
29
+ ]);
30
+ export function normalizeTargetIntegrationConfig(config) {
31
+ if (config === undefined) {
32
+ return defaultTargetIntegrationConfig;
33
+ }
34
+ return {
35
+ identityUpgrade: normalizeIntegrationAvailabilityState(config.identityUpgrade, defaultTargetIntegrationConfig.identityUpgrade),
36
+ presentation: normalizeIntegrationAvailabilityState(config.presentation, defaultTargetIntegrationConfig.presentation),
37
+ sharing: normalizeIntegrationAvailabilityState(config.sharing, defaultTargetIntegrationConfig.sharing),
38
+ inboundShare: normalizeIntegrationAvailabilityState(config.inboundShare, defaultTargetIntegrationConfig.inboundShare),
39
+ notifications: normalizeIntegrationAvailabilityState(config.notifications, defaultTargetIntegrationConfig.notifications),
40
+ presentationMode: normalizePresentationMode(config.presentationMode),
41
+ };
42
+ }
8
43
  export function targetConfigKeyForPlatform(target) {
9
44
  return target === 'browser' ? 'web-preview' : target;
10
45
  }
@@ -46,6 +81,10 @@ export function getFeatureAvailability(feature, config, capabilities) {
46
81
  : 'target-disabled',
47
82
  };
48
83
  }
84
+ export function getIntegrationAvailability(integration, config, gateway) {
85
+ const integrations = normalizeTargetIntegrationConfig(config.integrations);
86
+ return createIntegrationAvailability(integration, integrations[integration], gateway);
87
+ }
49
88
  export function createTargetRuntimeSnapshot(input) {
50
89
  const configTarget = input.configTarget ?? targetConfigKeyForPlatform(input.target);
51
90
  const features = {
@@ -55,13 +94,21 @@ export function createTargetRuntimeSnapshot(input) {
55
94
  leaderboard: getFeatureAvailability('leaderboard', input.config, input.capabilities),
56
95
  localization: getFeatureAvailability('localization', input.config, input.capabilities),
57
96
  };
97
+ const integrationConfig = normalizeTargetIntegrationConfig(input.config.integrations);
98
+ const integrationEntries = targetIntegrations.map((integration) => {
99
+ const availability = createIntegrationAvailability(integration, integrationConfig[integration], input.gateway);
100
+ return [integration, availability];
101
+ });
102
+ const integrations = Object.fromEntries(integrationEntries);
58
103
  return {
59
104
  target: input.target,
60
105
  configTarget,
61
106
  config: input.config,
62
107
  ...(input.effectiveConfig === undefined ? {} : { effectiveConfig: input.effectiveConfig }),
108
+ presentationMode: integrationConfig.presentationMode,
63
109
  capabilities: input.capabilities,
64
110
  features,
111
+ integrations,
65
112
  adPlacements: (input.adPlacements ?? []).map((placement) => {
66
113
  const feature = placement.type === 'rewarded' ? 'rewardedAds' : 'interstitialAds';
67
114
  const availability = features[feature];
@@ -76,6 +123,36 @@ export function createTargetRuntimeSnapshot(input) {
76
123
  }
77
124
  export function withTargetAvailability(gateway, config, options = {}) {
78
125
  const configTarget = options.configTarget ?? targetConfigKeyForPlatform(gateway.target);
126
+ const { identity: gatewayIdentity, presentation: gatewayPresentation, sharing: gatewaySharing, notifications: gatewayNotifications, ...gatewayWithoutIntegrations } = gateway;
127
+ const integrations = normalizeTargetIntegrationConfig(config.integrations);
128
+ const isIntegrationAvailable = (integration) => (createIntegrationAvailability(integration, integrations[integration], gateway).state
129
+ === 'available');
130
+ const identityUpgradeAvailable = isIntegrationAvailable('identityUpgrade');
131
+ const presentationAvailable = isIntegrationAvailable('presentation');
132
+ const sharingAvailable = isIntegrationAvailable('sharing');
133
+ const inboundShareAvailable = isIntegrationAvailable('inboundShare');
134
+ const notificationsAvailable = isIntegrationAvailable('notifications');
135
+ const getIdentitySession = gatewayIdentity.getSession?.bind(gatewayIdentity);
136
+ const requestIdentityUpgrade = gatewayIdentity.requestUpgrade?.bind(gatewayIdentity);
137
+ const shareOutbound = gatewaySharing?.share?.bind(gatewaySharing);
138
+ const readInboundShare = gatewaySharing?.readInboundShare?.bind(gatewaySharing);
139
+ const exposeOutboundShare = sharingAvailable && shareOutbound !== undefined;
140
+ const exposeInboundShare = inboundShareAvailable && readInboundShare !== undefined;
141
+ const identity = {
142
+ getPlayer: gatewayIdentity.getPlayer.bind(gatewayIdentity),
143
+ ...(getIdentitySession === undefined ? {} : { getSession: getIdentitySession }),
144
+ ...(!identityUpgradeAvailable || requestIdentityUpgrade === undefined
145
+ ? {}
146
+ : { requestUpgrade: requestIdentityUpgrade }),
147
+ };
148
+ const presentation = presentationAvailable ? gatewayPresentation : undefined;
149
+ const sharing = !exposeOutboundShare && !exposeInboundShare
150
+ ? undefined
151
+ : {
152
+ ...(exposeOutboundShare ? { share: shareOutbound } : {}),
153
+ ...(exposeInboundShare ? { readInboundShare } : {}),
154
+ };
155
+ const notifications = notificationsAvailable ? gatewayNotifications : undefined;
79
156
  const isAdPlacementAllowed = (placementId, expectedType) => {
80
157
  const actualType = options.resolveAdPlacementType?.(placementId);
81
158
  if (actualType !== undefined && actualType !== expectedType) {
@@ -96,7 +173,11 @@ export function withTargetAvailability(gateway, config, options = {}) {
96
173
  return config.features.rewardedAds || config.features.interstitialAds;
97
174
  };
98
175
  return {
99
- ...gateway,
176
+ ...gatewayWithoutIntegrations,
177
+ identity,
178
+ ...(presentation === undefined ? {} : { presentation }),
179
+ ...(sharing === undefined ? {} : { sharing }),
180
+ ...(notifications === undefined ? {} : { notifications }),
100
181
  configTarget,
101
182
  targetConfig: config,
102
183
  ...(options.effectiveConfig === undefined
@@ -112,6 +193,7 @@ export function withTargetAvailability(gateway, config, options = {}) {
112
193
  : { effectiveConfig: options.effectiveConfig }),
113
194
  capabilities: applyTargetConfigToCapabilities(await gateway.getCapabilities(), config),
114
195
  adPlacements: options.adPlacements ?? [],
196
+ gateway,
115
197
  });
116
198
  },
117
199
  async getCapabilities() {
@@ -192,3 +274,43 @@ function isFeatureCapabilitySupported(feature, capabilities) {
192
274
  return capabilities.localizedContent;
193
275
  }
194
276
  }
277
+ function isIntegrationAdapterSupported(integration, gateway) {
278
+ if (gateway === undefined) {
279
+ return false;
280
+ }
281
+ switch (integration) {
282
+ case 'identityUpgrade':
283
+ return typeof gateway.identity.requestUpgrade === 'function';
284
+ case 'presentation':
285
+ return (typeof gateway.presentation?.getLaunchIntent === 'function'
286
+ && typeof gateway.presentation?.requestGameSurface === 'function');
287
+ case 'sharing':
288
+ return typeof gateway.sharing?.share === 'function';
289
+ case 'inboundShare':
290
+ return typeof gateway.sharing?.readInboundShare === 'function';
291
+ case 'notifications':
292
+ return (typeof gateway.notifications?.getStatus === 'function'
293
+ && typeof gateway.notifications?.requestSubscription === 'function');
294
+ }
295
+ }
296
+ function createIntegrationAvailability(integration, configuredState, gateway) {
297
+ const adapterSupported = isIntegrationAdapterSupported(integration, gateway);
298
+ return {
299
+ integration,
300
+ state: adapterSupported ? configuredState : 'unsupported',
301
+ configuredState,
302
+ adapterSupported,
303
+ };
304
+ }
305
+ function normalizeIntegrationAvailabilityState(input, fallback) {
306
+ if (input !== undefined && integrationAvailabilityStates.has(input)) {
307
+ return input;
308
+ }
309
+ return fallback;
310
+ }
311
+ function normalizePresentationMode(input) {
312
+ if (input === 'inline-expanded' || input === 'fullscreen') {
313
+ return input;
314
+ }
315
+ return defaultTargetIntegrationConfig.presentationMode;
316
+ }
@@ -1,5 +1,7 @@
1
- import type { TargetConfig, TargetRuntimeKind } from './runtime';
1
+ import type { TargetConfig, TargetRuntimeKind } from './runtime.js';
2
2
  export type TargetViewportOrientation = 'portrait' | 'landscape';
3
+ export type TargetViewportOrientationPolicyMode = 'responsive' | 'prefer-landscape' | 'prefer-portrait' | 'lock-landscape' | 'lock-portrait';
4
+ export type TargetViewportOrientationMismatchBehavior = 'continue' | 'letterbox' | 'show-rotate-prompt';
3
5
  export type TargetViewportSizeClass = 'compact' | 'medium' | 'expanded';
4
6
  export type TargetViewportShell = 'browser' | 'mobile-webview' | 'embedded-webview';
5
7
  export type TargetViewportMeasurementSource = 'container' | 'visual-viewport' | 'window' | 'unknown';
@@ -14,6 +16,7 @@ export interface TargetViewportInput {
14
16
  readonly height: number;
15
17
  readonly runtime?: TargetRuntimeKind;
16
18
  readonly source?: TargetViewportMeasurementSource;
19
+ readonly orientationPolicy?: TargetViewportOrientationPolicy;
17
20
  }
18
21
  export interface TargetViewportLayout {
19
22
  readonly width: number;
@@ -31,17 +34,36 @@ export interface TargetViewportRecommendation {
31
34
  readonly secondaryPanels: TargetViewportPanelPlacement;
32
35
  readonly safeAreaAware: boolean;
33
36
  }
37
+ export interface TargetViewportOrientationPolicy {
38
+ readonly mode: TargetViewportOrientationPolicyMode;
39
+ readonly mismatchBehavior?: TargetViewportOrientationMismatchBehavior;
40
+ }
41
+ export interface TargetViewportOrientationPlan {
42
+ readonly mode: TargetViewportOrientationPolicyMode;
43
+ readonly preferredOrientation?: TargetViewportOrientation;
44
+ readonly lockedOrientation?: TargetViewportOrientation;
45
+ readonly mismatchBehavior: TargetViewportOrientationMismatchBehavior;
46
+ readonly isMismatch: boolean;
47
+ readonly shouldLetterbox: boolean;
48
+ readonly shouldShowRotatePrompt: boolean;
49
+ }
34
50
  export interface TargetViewportPlan {
35
51
  readonly layout: TargetViewportLayout;
36
52
  readonly recommendation: TargetViewportRecommendation;
53
+ readonly orientation: TargetViewportOrientationPlan;
37
54
  }
38
55
  export declare const defaultTargetViewportBreakpoints: {
39
56
  readonly compactMaxWidth: 599;
40
57
  readonly expandedMinWidth: 900;
41
58
  };
59
+ export declare const defaultTargetViewportOrientationPolicy: {
60
+ readonly mode: 'responsive';
61
+ readonly mismatchBehavior: 'continue';
62
+ };
42
63
  export declare function targetViewportShellForRuntime(runtime: TargetRuntimeKind): TargetViewportShell;
43
64
  export declare function targetViewportShellForConfig(config: Pick<TargetConfig, 'runtime'>): TargetViewportShell;
44
65
  export declare function resolveTargetViewportLayout(input: TargetViewportInput, breakpoints?: TargetViewportBreakpoints): TargetViewportLayout;
45
66
  export declare function resolveTargetViewportSizeClass(width: number, breakpoints?: TargetViewportBreakpoints): TargetViewportSizeClass;
46
67
  export declare function resolveTargetViewportRecommendation(layout: TargetViewportLayout): TargetViewportRecommendation;
68
+ export declare function resolveTargetViewportOrientationPlan(layout: Pick<TargetViewportLayout, 'orientation'>, policy?: TargetViewportOrientationPolicy): TargetViewportOrientationPlan;
47
69
  export declare function resolveTargetViewportPlan(input: TargetViewportInput, breakpoints?: TargetViewportBreakpoints): TargetViewportPlan;
package/dist/viewport.js CHANGED
@@ -2,6 +2,37 @@ export const defaultTargetViewportBreakpoints = {
2
2
  compactMaxWidth: 599,
3
3
  expandedMinWidth: 900,
4
4
  };
5
+ export const defaultTargetViewportOrientationPolicy = {
6
+ mode: 'responsive',
7
+ mismatchBehavior: 'continue',
8
+ };
9
+ const targetViewportOrientationPolicyModeDescriptors = {
10
+ responsive: {
11
+ preferredOrientation: undefined,
12
+ lockedOrientation: undefined,
13
+ isLocked: false,
14
+ },
15
+ 'prefer-landscape': {
16
+ preferredOrientation: 'landscape',
17
+ lockedOrientation: undefined,
18
+ isLocked: false,
19
+ },
20
+ 'prefer-portrait': {
21
+ preferredOrientation: 'portrait',
22
+ lockedOrientation: undefined,
23
+ isLocked: false,
24
+ },
25
+ 'lock-landscape': {
26
+ preferredOrientation: 'landscape',
27
+ lockedOrientation: 'landscape',
28
+ isLocked: true,
29
+ },
30
+ 'lock-portrait': {
31
+ preferredOrientation: 'portrait',
32
+ lockedOrientation: 'portrait',
33
+ isLocked: true,
34
+ },
35
+ };
5
36
  export function targetViewportShellForRuntime(runtime) {
6
37
  switch (runtime) {
7
38
  case 'capacitor-android':
@@ -51,11 +82,29 @@ export function resolveTargetViewportRecommendation(layout) {
51
82
  safeAreaAware: layout.shell !== 'browser' || layout.sizeClass === 'compact' || browserSafeAreaRisk,
52
83
  };
53
84
  }
85
+ export function resolveTargetViewportOrientationPlan(layout, policy = defaultTargetViewportOrientationPolicy) {
86
+ const normalizedPolicy = normalizeTargetViewportOrientationPolicy(policy);
87
+ const descriptor = targetViewportOrientationPolicyModeDescriptors[normalizedPolicy.mode];
88
+ const preferredOrientation = descriptor.preferredOrientation;
89
+ const lockedOrientation = descriptor.lockedOrientation;
90
+ const isMismatch = preferredOrientation !== undefined && layout.orientation !== preferredOrientation;
91
+ const mismatchBehavior = normalizedPolicy.mismatchBehavior;
92
+ return {
93
+ mode: normalizedPolicy.mode,
94
+ ...(preferredOrientation === undefined ? {} : { preferredOrientation }),
95
+ ...(lockedOrientation === undefined ? {} : { lockedOrientation }),
96
+ mismatchBehavior,
97
+ isMismatch,
98
+ shouldLetterbox: isMismatch && mismatchBehavior === 'letterbox',
99
+ shouldShowRotatePrompt: isMismatch && mismatchBehavior === 'show-rotate-prompt',
100
+ };
101
+ }
54
102
  export function resolveTargetViewportPlan(input, breakpoints = defaultTargetViewportBreakpoints) {
55
103
  const layout = resolveTargetViewportLayout(input, breakpoints);
56
104
  return {
57
105
  layout,
58
106
  recommendation: resolveTargetViewportRecommendation(layout),
107
+ orientation: resolveTargetViewportOrientationPlan(layout, input.orientationPolicy),
59
108
  };
60
109
  }
61
110
  function classifyTargetViewportSize(width, breakpoints) {
@@ -76,6 +125,14 @@ function resolveTargetViewportPanelPlacement(layout) {
76
125
  }
77
126
  return 'side';
78
127
  }
128
+ function normalizeTargetViewportOrientationPolicy(policy) {
129
+ const descriptor = targetViewportOrientationPolicyModeDescriptors[policy.mode];
130
+ return {
131
+ mode: policy.mode,
132
+ mismatchBehavior: policy.mismatchBehavior ??
133
+ (descriptor.isLocked ? 'show-rotate-prompt' : 'continue'),
134
+ };
135
+ }
79
136
  function normalizeTargetViewportBreakpoints(breakpoints) {
80
137
  const compactMaxWidth = normalizeViewportDimension(breakpoints.compactMaxWidth, 'compactMaxWidth');
81
138
  const expandedMinWidth = normalizeViewportDimension(breakpoints.expandedMinWidth, 'expandedMinWidth');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mpgd/target-config",
3
- "version": "0.3.4",
3
+ "version": "0.5.0",
4
4
  "description": "Target-specific platform feature availability and effective config helpers for mpgd.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -37,8 +37,8 @@
37
37
  ],
38
38
  "dependencies": {
39
39
  "typia": "rc",
40
- "@mpgd/catalog": "0.3.2",
41
- "@mpgd/platform": "0.3.2"
40
+ "@mpgd/catalog": "0.3.3",
41
+ "@mpgd/platform": "0.4.0"
42
42
  },
43
43
  "devDependencies": {
44
44
  "ttsc": "0.16.9",
package/targets.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2026-07-03",
2
+ "version": "2026-07-10",
3
3
  "targets": {
4
4
  "web-preview": {
5
5
  "runtime": "web-preview",
@@ -25,6 +25,14 @@
25
25
  "release": {
26
26
  "profile": "web-preview"
27
27
  },
28
+ "integrations": {
29
+ "identityUpgrade": "disabled",
30
+ "presentation": "available",
31
+ "sharing": "available",
32
+ "inboundShare": "available",
33
+ "notifications": "unsupported",
34
+ "presentationMode": "fullscreen"
35
+ },
28
36
  "policy": {
29
37
  "externalPaymentAllowed": false,
30
38
  "remoteExecutableCodeAllowed": false,
@@ -57,6 +65,14 @@
57
65
  "release": {
58
66
  "profile": "microsoft-store"
59
67
  },
68
+ "integrations": {
69
+ "identityUpgrade": "disabled",
70
+ "presentation": "available",
71
+ "sharing": "available",
72
+ "inboundShare": "available",
73
+ "notifications": "unsupported",
74
+ "presentationMode": "fullscreen"
75
+ },
60
76
  "policy": {
61
77
  "externalPaymentAllowed": false,
62
78
  "remoteExecutableCodeAllowed": false,
@@ -89,6 +105,14 @@
89
105
  "release": {
90
106
  "profile": "google-play"
91
107
  },
108
+ "integrations": {
109
+ "identityUpgrade": "configuration-required",
110
+ "presentation": "available",
111
+ "sharing": "configuration-required",
112
+ "inboundShare": "configuration-required",
113
+ "notifications": "configuration-required",
114
+ "presentationMode": "fullscreen"
115
+ },
92
116
  "policy": {
93
117
  "externalPaymentAllowed": false,
94
118
  "remoteExecutableCodeAllowed": false,
@@ -121,6 +145,14 @@
121
145
  "release": {
122
146
  "profile": "app-store"
123
147
  },
148
+ "integrations": {
149
+ "identityUpgrade": "configuration-required",
150
+ "presentation": "available",
151
+ "sharing": "configuration-required",
152
+ "inboundShare": "configuration-required",
153
+ "notifications": "configuration-required",
154
+ "presentationMode": "fullscreen"
155
+ },
124
156
  "policy": {
125
157
  "externalPaymentAllowed": false,
126
158
  "remoteExecutableCodeAllowed": false,
@@ -153,6 +185,14 @@
153
185
  "release": {
154
186
  "profile": "apps-in-toss"
155
187
  },
188
+ "integrations": {
189
+ "identityUpgrade": "configuration-required",
190
+ "presentation": "available",
191
+ "sharing": "available",
192
+ "inboundShare": "available",
193
+ "notifications": "configuration-required",
194
+ "presentationMode": "fullscreen"
195
+ },
156
196
  "policy": {
157
197
  "externalPaymentAllowed": false,
158
198
  "remoteExecutableCodeAllowed": false,
@@ -185,6 +225,14 @@
185
225
  "release": {
186
226
  "profile": "devvit"
187
227
  },
228
+ "integrations": {
229
+ "identityUpgrade": "configuration-required",
230
+ "presentation": "configuration-required",
231
+ "sharing": "configuration-required",
232
+ "inboundShare": "configuration-required",
233
+ "notifications": "approval-required",
234
+ "presentationMode": "inline-expanded"
235
+ },
188
236
  "policy": {
189
237
  "externalPaymentAllowed": false,
190
238
  "remoteExecutableCodeAllowed": false,