@mpgd/catalog 0.3.4 → 0.4.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.
- package/dist/index.d.ts +2 -2
- package/dist/index.js +65 -60
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { LogicalAdPlacementId, LogicalProductId, ProductType } from '@mpgd/platform';
|
|
2
|
-
export type CatalogTarget = 'android' | 'ios' | 'ait';
|
|
3
|
-
export type AdPlacementTarget = CatalogTarget
|
|
2
|
+
export type CatalogTarget = 'android' | 'ios' | 'ait' | 'reddit';
|
|
3
|
+
export type AdPlacementTarget = Exclude<CatalogTarget, 'reddit'>;
|
|
4
4
|
export type ProductGrant = {
|
|
5
5
|
readonly type: 'currency';
|
|
6
6
|
readonly currency: 'coin' | 'gem';
|
package/dist/index.js
CHANGED
|
@@ -1,106 +1,111 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _assertGuard_1 from "typia/lib/internal/_assertGuard";
|
|
2
2
|
import typia from 'typia';
|
|
3
3
|
export const assertProductCatalog = (() => {
|
|
4
4
|
const _ae0 = "({ readonly type: \"currency\"; readonly currency: \"coin\" | \"gem\"; readonly amount: number; } | { readonly type: \"entitlement\"; readonly entitlement: string; })";
|
|
5
|
-
const _ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.version ||
|
|
5
|
+
const _ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.version || _assertGuard_1._assertGuard(_exceptionable, {
|
|
6
6
|
method: "typia.createAssert",
|
|
7
7
|
path: _path + ".version",
|
|
8
8
|
expected: "string",
|
|
9
9
|
value: input.version
|
|
10
|
-
}, _errorFactory)) && ((Array.isArray(input.products) ||
|
|
10
|
+
}, _errorFactory)) && ((Array.isArray(input.products) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
11
11
|
method: "typia.createAssert",
|
|
12
12
|
path: _path + ".products",
|
|
13
13
|
expected: "ReadonlyArray<ProductCatalogEntry>",
|
|
14
14
|
value: input.products
|
|
15
|
-
}, _errorFactory)) && input.products.every((elem, _index2) => ("object" === typeof elem && null !== elem ||
|
|
15
|
+
}, _errorFactory)) && input.products.every((elem, _index2) => ("object" === typeof elem && null !== elem || _assertGuard_1._assertGuard(_exceptionable, {
|
|
16
16
|
method: "typia.createAssert",
|
|
17
17
|
path: _path + ".products[" + _index2 + "]",
|
|
18
18
|
expected: "ProductCatalogEntry",
|
|
19
19
|
value: elem
|
|
20
|
-
}, _errorFactory)) && _ao1(elem, _path + ".products[" + _index2 + "]", true && _exceptionable) ||
|
|
20
|
+
}, _errorFactory)) && _ao1(elem, _path + ".products[" + _index2 + "]", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
21
21
|
method: "typia.createAssert",
|
|
22
22
|
path: _path + ".products[" + _index2 + "]",
|
|
23
23
|
expected: "ProductCatalogEntry",
|
|
24
24
|
value: elem
|
|
25
|
-
}, _errorFactory)) ||
|
|
25
|
+
}, _errorFactory)) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
26
26
|
method: "typia.createAssert",
|
|
27
27
|
path: _path + ".products",
|
|
28
28
|
expected: "ReadonlyArray<ProductCatalogEntry>",
|
|
29
29
|
value: input.products
|
|
30
30
|
}, _errorFactory));
|
|
31
|
-
const _ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.id ||
|
|
31
|
+
const _ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.id || _assertGuard_1._assertGuard(_exceptionable, {
|
|
32
32
|
method: "typia.createAssert",
|
|
33
33
|
path: _path + ".id",
|
|
34
34
|
expected: "string",
|
|
35
35
|
value: input.id
|
|
36
|
-
}, _errorFactory)) && ("consumable" === input.type || "non_consumable" === input.type || "subscription" === input.type ||
|
|
36
|
+
}, _errorFactory)) && ("consumable" === input.type || "non_consumable" === input.type || "subscription" === input.type || _assertGuard_1._assertGuard(_exceptionable, {
|
|
37
37
|
method: "typia.createAssert",
|
|
38
38
|
path: _path + ".type",
|
|
39
39
|
expected: "(\"consumable\" | \"non_consumable\" | \"subscription\")",
|
|
40
40
|
value: input.type
|
|
41
|
-
}, _errorFactory)) && (("object" === typeof input.grant && null !== input.grant ||
|
|
41
|
+
}, _errorFactory)) && (("object" === typeof input.grant && null !== input.grant || _assertGuard_1._assertGuard(_exceptionable, {
|
|
42
42
|
method: "typia.createAssert",
|
|
43
43
|
path: _path + ".grant",
|
|
44
44
|
expected: _ae0,
|
|
45
45
|
value: input.grant
|
|
46
|
-
}, _errorFactory)) && _au0(input.grant, _path + ".grant", true && _exceptionable) ||
|
|
46
|
+
}, _errorFactory)) && _au0(input.grant, _path + ".grant", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
47
47
|
method: "typia.createAssert",
|
|
48
48
|
path: _path + ".grant",
|
|
49
49
|
expected: _ae0,
|
|
50
50
|
value: input.grant
|
|
51
|
-
}, _errorFactory)) && (("object" === typeof input.platformProductIds && null !== input.platformProductIds && false === Array.isArray(input.platformProductIds) ||
|
|
51
|
+
}, _errorFactory)) && (("object" === typeof input.platformProductIds && null !== input.platformProductIds && false === Array.isArray(input.platformProductIds) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
52
52
|
method: "typia.createAssert",
|
|
53
53
|
path: _path + ".platformProductIds",
|
|
54
54
|
expected: "Partial<Record<CatalogTarget, string>>",
|
|
55
55
|
value: input.platformProductIds
|
|
56
|
-
}, _errorFactory)) && _ao4(input.platformProductIds, _path + ".platformProductIds", true && _exceptionable) ||
|
|
56
|
+
}, _errorFactory)) && _ao4(input.platformProductIds, _path + ".platformProductIds", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
57
57
|
method: "typia.createAssert",
|
|
58
58
|
path: _path + ".platformProductIds",
|
|
59
59
|
expected: "Partial<Record<CatalogTarget, string>>",
|
|
60
60
|
value: input.platformProductIds
|
|
61
61
|
}, _errorFactory));
|
|
62
|
-
const _ao2 = (input, _path, _exceptionable = true) => ("currency" === input.type ||
|
|
62
|
+
const _ao2 = (input, _path, _exceptionable = true) => ("currency" === input.type || _assertGuard_1._assertGuard(_exceptionable, {
|
|
63
63
|
method: "typia.createAssert",
|
|
64
64
|
path: _path + ".type",
|
|
65
65
|
expected: "\"currency\"",
|
|
66
66
|
value: input.type
|
|
67
|
-
}, _errorFactory)) && ("coin" === input.currency || "gem" === input.currency ||
|
|
67
|
+
}, _errorFactory)) && ("coin" === input.currency || "gem" === input.currency || _assertGuard_1._assertGuard(_exceptionable, {
|
|
68
68
|
method: "typia.createAssert",
|
|
69
69
|
path: _path + ".currency",
|
|
70
70
|
expected: "(\"coin\" | \"gem\")",
|
|
71
71
|
value: input.currency
|
|
72
|
-
}, _errorFactory)) && ("number" === typeof input.amount ||
|
|
72
|
+
}, _errorFactory)) && ("number" === typeof input.amount || _assertGuard_1._assertGuard(_exceptionable, {
|
|
73
73
|
method: "typia.createAssert",
|
|
74
74
|
path: _path + ".amount",
|
|
75
75
|
expected: "number",
|
|
76
76
|
value: input.amount
|
|
77
77
|
}, _errorFactory));
|
|
78
|
-
const _ao3 = (input, _path, _exceptionable = true) => ("entitlement" === input.type ||
|
|
78
|
+
const _ao3 = (input, _path, _exceptionable = true) => ("entitlement" === input.type || _assertGuard_1._assertGuard(_exceptionable, {
|
|
79
79
|
method: "typia.createAssert",
|
|
80
80
|
path: _path + ".type",
|
|
81
81
|
expected: "\"entitlement\"",
|
|
82
82
|
value: input.type
|
|
83
|
-
}, _errorFactory)) && ("string" === typeof input.entitlement ||
|
|
83
|
+
}, _errorFactory)) && ("string" === typeof input.entitlement || _assertGuard_1._assertGuard(_exceptionable, {
|
|
84
84
|
method: "typia.createAssert",
|
|
85
85
|
path: _path + ".entitlement",
|
|
86
86
|
expected: "string",
|
|
87
87
|
value: input.entitlement
|
|
88
88
|
}, _errorFactory));
|
|
89
|
-
const _ao4 = (input, _path, _exceptionable = true) => (undefined === input.ait || "string" === typeof input.ait ||
|
|
89
|
+
const _ao4 = (input, _path, _exceptionable = true) => (undefined === input.ait || "string" === typeof input.ait || _assertGuard_1._assertGuard(_exceptionable, {
|
|
90
90
|
method: "typia.createAssert",
|
|
91
91
|
path: _path + ".ait",
|
|
92
92
|
expected: "(string | undefined)",
|
|
93
93
|
value: input.ait
|
|
94
|
-
}, _errorFactory)) && (undefined === input.android || "string" === typeof input.android ||
|
|
94
|
+
}, _errorFactory)) && (undefined === input.android || "string" === typeof input.android || _assertGuard_1._assertGuard(_exceptionable, {
|
|
95
95
|
method: "typia.createAssert",
|
|
96
96
|
path: _path + ".android",
|
|
97
97
|
expected: "(string | undefined)",
|
|
98
98
|
value: input.android
|
|
99
|
-
}, _errorFactory)) && (undefined === input.ios || "string" === typeof input.ios ||
|
|
99
|
+
}, _errorFactory)) && (undefined === input.ios || "string" === typeof input.ios || _assertGuard_1._assertGuard(_exceptionable, {
|
|
100
100
|
method: "typia.createAssert",
|
|
101
101
|
path: _path + ".ios",
|
|
102
102
|
expected: "(string | undefined)",
|
|
103
103
|
value: input.ios
|
|
104
|
+
}, _errorFactory)) && (undefined === input.reddit || "string" === typeof input.reddit || _assertGuard_1._assertGuard(_exceptionable, {
|
|
105
|
+
method: "typia.createAssert",
|
|
106
|
+
path: _path + ".reddit",
|
|
107
|
+
expected: "(string | undefined)",
|
|
108
|
+
value: input.reddit
|
|
104
109
|
}, _errorFactory));
|
|
105
110
|
const _au0 = (input, _path, _exceptionable = true) => (() => {
|
|
106
111
|
if ("currency" === input.type)
|
|
@@ -108,7 +113,7 @@ export const assertProductCatalog = (() => {
|
|
|
108
113
|
else if ("entitlement" === input.type)
|
|
109
114
|
return _ao3(input, _path, true && _exceptionable);
|
|
110
115
|
else
|
|
111
|
-
return
|
|
116
|
+
return _assertGuard_1._assertGuard(_exceptionable, {
|
|
112
117
|
method: "typia.createAssert",
|
|
113
118
|
path: _path,
|
|
114
119
|
expected: _ae0,
|
|
@@ -119,7 +124,7 @@ export const assertProductCatalog = (() => {
|
|
|
119
124
|
const _io1 = input => "string" === typeof input.id && ("consumable" === input.type || "non_consumable" === input.type || "subscription" === input.type) && ("object" === typeof input.grant && null !== input.grant && _iu0(input.grant)) && ("object" === typeof input.platformProductIds && null !== input.platformProductIds && false === Array.isArray(input.platformProductIds) && _io4(input.platformProductIds));
|
|
120
125
|
const _io2 = input => "currency" === input.type && ("coin" === input.currency || "gem" === input.currency) && "number" === typeof input.amount;
|
|
121
126
|
const _io3 = input => "entitlement" === input.type && "string" === typeof input.entitlement;
|
|
122
|
-
const _io4 = input => (undefined === input.ait || "string" === typeof input.ait) && (undefined === input.android || "string" === typeof input.android) && (undefined === input.ios || "string" === typeof input.ios);
|
|
127
|
+
const _io4 = input => (undefined === input.ait || "string" === typeof input.ait) && (undefined === input.android || "string" === typeof input.android) && (undefined === input.ios || "string" === typeof input.ios) && (undefined === input.reddit || "string" === typeof input.reddit);
|
|
123
128
|
const _iu0 = input => (() => {
|
|
124
129
|
if ("currency" === input.type)
|
|
125
130
|
return _io2(input);
|
|
@@ -133,12 +138,12 @@ export const assertProductCatalog = (() => {
|
|
|
133
138
|
return (input, errorFactory) => {
|
|
134
139
|
if (false === __is(input)) {
|
|
135
140
|
_errorFactory = errorFactory;
|
|
136
|
-
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input ||
|
|
141
|
+
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _assertGuard_1._assertGuard(true, {
|
|
137
142
|
method: "typia.createAssert",
|
|
138
143
|
path: _path + "",
|
|
139
144
|
expected: "ProductCatalog",
|
|
140
145
|
value: input
|
|
141
|
-
}, _errorFactory)) && _ao0(input, _path + "", true) ||
|
|
146
|
+
}, _errorFactory)) && _ao0(input, _path + "", true) || _assertGuard_1._assertGuard(true, {
|
|
142
147
|
method: "typia.createAssert",
|
|
143
148
|
path: _path + "",
|
|
144
149
|
expected: "ProductCatalog",
|
|
@@ -151,124 +156,124 @@ export const assertProductCatalog = (() => {
|
|
|
151
156
|
export const assertAdPlacements = (() => {
|
|
152
157
|
const _ip0 = input => "number" === typeof input["amount"];
|
|
153
158
|
const _ae0 = "(undefined | { readonly type: \"continue\"; readonly amount: number; } | { readonly type: \"currency\"; readonly amount: number; readonly currency: \"coin\" | \"gem\"; })";
|
|
154
|
-
const _ap0 = (input, _path, _exceptionable = true) => "number" === typeof input["amount"] ||
|
|
159
|
+
const _ap0 = (input, _path, _exceptionable = true) => "number" === typeof input["amount"] || _assertGuard_1._assertGuard(_exceptionable, {
|
|
155
160
|
method: "typia.createAssert",
|
|
156
161
|
path: _path + ".amount",
|
|
157
162
|
expected: "number",
|
|
158
163
|
value: input["amount"]
|
|
159
164
|
}, _errorFactory);
|
|
160
165
|
const _ae1 = "({ readonly type: \"continue\"; readonly amount: number; } | { readonly type: \"currency\"; readonly amount: number; readonly currency: \"coin\" | \"gem\"; })";
|
|
161
|
-
const _ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.version ||
|
|
166
|
+
const _ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.version || _assertGuard_1._assertGuard(_exceptionable, {
|
|
162
167
|
method: "typia.createAssert",
|
|
163
168
|
path: _path + ".version",
|
|
164
169
|
expected: "string",
|
|
165
170
|
value: input.version
|
|
166
|
-
}, _errorFactory)) && ((Array.isArray(input.placements) ||
|
|
171
|
+
}, _errorFactory)) && ((Array.isArray(input.placements) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
167
172
|
method: "typia.createAssert",
|
|
168
173
|
path: _path + ".placements",
|
|
169
174
|
expected: "ReadonlyArray<AdPlacementEntry>",
|
|
170
175
|
value: input.placements
|
|
171
|
-
}, _errorFactory)) && input.placements.every((elem, _index2) => ("object" === typeof elem && null !== elem ||
|
|
176
|
+
}, _errorFactory)) && input.placements.every((elem, _index2) => ("object" === typeof elem && null !== elem || _assertGuard_1._assertGuard(_exceptionable, {
|
|
172
177
|
method: "typia.createAssert",
|
|
173
178
|
path: _path + ".placements[" + _index2 + "]",
|
|
174
179
|
expected: "AdPlacementEntry",
|
|
175
180
|
value: elem
|
|
176
|
-
}, _errorFactory)) && _ao1(elem, _path + ".placements[" + _index2 + "]", true && _exceptionable) ||
|
|
181
|
+
}, _errorFactory)) && _ao1(elem, _path + ".placements[" + _index2 + "]", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
177
182
|
method: "typia.createAssert",
|
|
178
183
|
path: _path + ".placements[" + _index2 + "]",
|
|
179
184
|
expected: "AdPlacementEntry",
|
|
180
185
|
value: elem
|
|
181
|
-
}, _errorFactory)) ||
|
|
186
|
+
}, _errorFactory)) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
182
187
|
method: "typia.createAssert",
|
|
183
188
|
path: _path + ".placements",
|
|
184
189
|
expected: "ReadonlyArray<AdPlacementEntry>",
|
|
185
190
|
value: input.placements
|
|
186
191
|
}, _errorFactory));
|
|
187
|
-
const _ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.id ||
|
|
192
|
+
const _ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.id || _assertGuard_1._assertGuard(_exceptionable, {
|
|
188
193
|
method: "typia.createAssert",
|
|
189
194
|
path: _path + ".id",
|
|
190
195
|
expected: "string",
|
|
191
196
|
value: input.id
|
|
192
|
-
}, _errorFactory)) && ("interstitial" === input.type || "rewarded" === input.type ||
|
|
197
|
+
}, _errorFactory)) && ("interstitial" === input.type || "rewarded" === input.type || _assertGuard_1._assertGuard(_exceptionable, {
|
|
193
198
|
method: "typia.createAssert",
|
|
194
199
|
path: _path + ".type",
|
|
195
200
|
expected: "(\"interstitial\" | \"rewarded\")",
|
|
196
201
|
value: input.type
|
|
197
|
-
}, _errorFactory)) && (undefined === input.reward || ("object" === typeof input.reward && null !== input.reward ||
|
|
202
|
+
}, _errorFactory)) && (undefined === input.reward || ("object" === typeof input.reward && null !== input.reward || _assertGuard_1._assertGuard(_exceptionable, {
|
|
198
203
|
method: "typia.createAssert",
|
|
199
204
|
path: _path + ".reward",
|
|
200
205
|
expected: _ae0,
|
|
201
206
|
value: input.reward
|
|
202
|
-
}, _errorFactory)) && _au0(input.reward, _path + ".reward", true && _exceptionable) ||
|
|
207
|
+
}, _errorFactory)) && _au0(input.reward, _path + ".reward", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
203
208
|
method: "typia.createAssert",
|
|
204
209
|
path: _path + ".reward",
|
|
205
210
|
expected: _ae0,
|
|
206
211
|
value: input.reward
|
|
207
|
-
}, _errorFactory)) && (("object" === typeof input.frequencyCap && null !== input.frequencyCap ||
|
|
212
|
+
}, _errorFactory)) && (("object" === typeof input.frequencyCap && null !== input.frequencyCap || _assertGuard_1._assertGuard(_exceptionable, {
|
|
208
213
|
method: "typia.createAssert",
|
|
209
214
|
path: _path + ".frequencyCap",
|
|
210
215
|
expected: "FrequencyCap",
|
|
211
216
|
value: input.frequencyCap
|
|
212
|
-
}, _errorFactory)) && _ao4(input.frequencyCap, _path + ".frequencyCap", true && _exceptionable) ||
|
|
217
|
+
}, _errorFactory)) && _ao4(input.frequencyCap, _path + ".frequencyCap", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
213
218
|
method: "typia.createAssert",
|
|
214
219
|
path: _path + ".frequencyCap",
|
|
215
220
|
expected: "FrequencyCap",
|
|
216
221
|
value: input.frequencyCap
|
|
217
|
-
}, _errorFactory)) && (("object" === typeof input.platformPlacementIds && null !== input.platformPlacementIds && false === Array.isArray(input.platformPlacementIds) ||
|
|
222
|
+
}, _errorFactory)) && (("object" === typeof input.platformPlacementIds && null !== input.platformPlacementIds && false === Array.isArray(input.platformPlacementIds) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
218
223
|
method: "typia.createAssert",
|
|
219
224
|
path: _path + ".platformPlacementIds",
|
|
220
|
-
expected: "Partial<Record<
|
|
225
|
+
expected: "Partial<Record<AdPlacementTarget, string>>",
|
|
221
226
|
value: input.platformPlacementIds
|
|
222
|
-
}, _errorFactory)) && _ao5(input.platformPlacementIds, _path + ".platformPlacementIds", true && _exceptionable) ||
|
|
227
|
+
}, _errorFactory)) && _ao5(input.platformPlacementIds, _path + ".platformPlacementIds", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
223
228
|
method: "typia.createAssert",
|
|
224
229
|
path: _path + ".platformPlacementIds",
|
|
225
|
-
expected: "Partial<Record<
|
|
230
|
+
expected: "Partial<Record<AdPlacementTarget, string>>",
|
|
226
231
|
value: input.platformPlacementIds
|
|
227
232
|
}, _errorFactory));
|
|
228
|
-
const _ao2 = (input, _path, _exceptionable = true) => ("continue" === input.type ||
|
|
233
|
+
const _ao2 = (input, _path, _exceptionable = true) => ("continue" === input.type || _assertGuard_1._assertGuard(_exceptionable, {
|
|
229
234
|
method: "typia.createAssert",
|
|
230
235
|
path: _path + ".type",
|
|
231
236
|
expected: "\"continue\"",
|
|
232
237
|
value: input.type
|
|
233
238
|
}, _errorFactory)) && _ap0(input, _path, true && _exceptionable);
|
|
234
|
-
const _ao3 = (input, _path, _exceptionable = true) => ("currency" === input.type ||
|
|
239
|
+
const _ao3 = (input, _path, _exceptionable = true) => ("currency" === input.type || _assertGuard_1._assertGuard(_exceptionable, {
|
|
235
240
|
method: "typia.createAssert",
|
|
236
241
|
path: _path + ".type",
|
|
237
242
|
expected: "\"currency\"",
|
|
238
243
|
value: input.type
|
|
239
|
-
}, _errorFactory)) && _ap0(input, _path, true && _exceptionable) && ("coin" === input.currency || "gem" === input.currency ||
|
|
244
|
+
}, _errorFactory)) && _ap0(input, _path, true && _exceptionable) && ("coin" === input.currency || "gem" === input.currency || _assertGuard_1._assertGuard(_exceptionable, {
|
|
240
245
|
method: "typia.createAssert",
|
|
241
246
|
path: _path + ".currency",
|
|
242
247
|
expected: "(\"coin\" | \"gem\")",
|
|
243
248
|
value: input.currency
|
|
244
249
|
}, _errorFactory));
|
|
245
|
-
const _ao4 = (input, _path, _exceptionable = true) => ("number" === typeof input.cooldownSeconds ||
|
|
250
|
+
const _ao4 = (input, _path, _exceptionable = true) => ("number" === typeof input.cooldownSeconds || _assertGuard_1._assertGuard(_exceptionable, {
|
|
246
251
|
method: "typia.createAssert",
|
|
247
252
|
path: _path + ".cooldownSeconds",
|
|
248
253
|
expected: "number",
|
|
249
254
|
value: input.cooldownSeconds
|
|
250
|
-
}, _errorFactory)) && (undefined === input.maxPerSession || "number" === typeof input.maxPerSession ||
|
|
255
|
+
}, _errorFactory)) && (undefined === input.maxPerSession || "number" === typeof input.maxPerSession || _assertGuard_1._assertGuard(_exceptionable, {
|
|
251
256
|
method: "typia.createAssert",
|
|
252
257
|
path: _path + ".maxPerSession",
|
|
253
258
|
expected: "(number | undefined)",
|
|
254
259
|
value: input.maxPerSession
|
|
255
|
-
}, _errorFactory)) && (undefined === input.minStageInterval || "number" === typeof input.minStageInterval ||
|
|
260
|
+
}, _errorFactory)) && (undefined === input.minStageInterval || "number" === typeof input.minStageInterval || _assertGuard_1._assertGuard(_exceptionable, {
|
|
256
261
|
method: "typia.createAssert",
|
|
257
262
|
path: _path + ".minStageInterval",
|
|
258
263
|
expected: "(number | undefined)",
|
|
259
264
|
value: input.minStageInterval
|
|
260
265
|
}, _errorFactory));
|
|
261
|
-
const _ao5 = (input, _path, _exceptionable = true) => (undefined === input.ait || "string" === typeof input.ait ||
|
|
266
|
+
const _ao5 = (input, _path, _exceptionable = true) => (undefined === input.ait || "string" === typeof input.ait || _assertGuard_1._assertGuard(_exceptionable, {
|
|
262
267
|
method: "typia.createAssert",
|
|
263
268
|
path: _path + ".ait",
|
|
264
269
|
expected: "(string | undefined)",
|
|
265
270
|
value: input.ait
|
|
266
|
-
}, _errorFactory)) && (undefined === input.android || "string" === typeof input.android ||
|
|
271
|
+
}, _errorFactory)) && (undefined === input.android || "string" === typeof input.android || _assertGuard_1._assertGuard(_exceptionable, {
|
|
267
272
|
method: "typia.createAssert",
|
|
268
273
|
path: _path + ".android",
|
|
269
274
|
expected: "(string | undefined)",
|
|
270
275
|
value: input.android
|
|
271
|
-
}, _errorFactory)) && (undefined === input.ios || "string" === typeof input.ios ||
|
|
276
|
+
}, _errorFactory)) && (undefined === input.ios || "string" === typeof input.ios || _assertGuard_1._assertGuard(_exceptionable, {
|
|
272
277
|
method: "typia.createAssert",
|
|
273
278
|
path: _path + ".ios",
|
|
274
279
|
expected: "(string | undefined)",
|
|
@@ -280,7 +285,7 @@ export const assertAdPlacements = (() => {
|
|
|
280
285
|
else if ("currency" === input.type)
|
|
281
286
|
return _ao3(input, _path, true && _exceptionable);
|
|
282
287
|
else
|
|
283
|
-
return
|
|
288
|
+
return _assertGuard_1._assertGuard(_exceptionable, {
|
|
284
289
|
method: "typia.createAssert",
|
|
285
290
|
path: _path,
|
|
286
291
|
expected: _ae1,
|
|
@@ -306,12 +311,12 @@ export const assertAdPlacements = (() => {
|
|
|
306
311
|
return (input, errorFactory) => {
|
|
307
312
|
if (false === __is(input)) {
|
|
308
313
|
_errorFactory = errorFactory;
|
|
309
|
-
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input ||
|
|
314
|
+
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _assertGuard_1._assertGuard(true, {
|
|
310
315
|
method: "typia.createAssert",
|
|
311
316
|
path: _path + "",
|
|
312
317
|
expected: "AdPlacements",
|
|
313
318
|
value: input
|
|
314
|
-
}, _errorFactory)) && _ao0(input, _path + "", true) ||
|
|
319
|
+
}, _errorFactory)) && _ao0(input, _path + "", true) || _assertGuard_1._assertGuard(true, {
|
|
315
320
|
method: "typia.createAssert",
|
|
316
321
|
path: _path + "",
|
|
317
322
|
expected: "AdPlacements",
|
|
@@ -323,28 +328,28 @@ export const assertAdPlacements = (() => {
|
|
|
323
328
|
})();
|
|
324
329
|
export const assertProductGrant = (() => {
|
|
325
330
|
const _ae0 = "({ readonly type: \"currency\"; readonly currency: \"coin\" | \"gem\"; readonly amount: number; } | { readonly type: \"entitlement\"; readonly entitlement: string; })";
|
|
326
|
-
const _ao0 = (input, _path, _exceptionable = true) => ("currency" === input.type ||
|
|
331
|
+
const _ao0 = (input, _path, _exceptionable = true) => ("currency" === input.type || _assertGuard_1._assertGuard(_exceptionable, {
|
|
327
332
|
method: "typia.createAssert",
|
|
328
333
|
path: _path + ".type",
|
|
329
334
|
expected: "\"currency\"",
|
|
330
335
|
value: input.type
|
|
331
|
-
}, _errorFactory)) && ("coin" === input.currency || "gem" === input.currency ||
|
|
336
|
+
}, _errorFactory)) && ("coin" === input.currency || "gem" === input.currency || _assertGuard_1._assertGuard(_exceptionable, {
|
|
332
337
|
method: "typia.createAssert",
|
|
333
338
|
path: _path + ".currency",
|
|
334
339
|
expected: "(\"coin\" | \"gem\")",
|
|
335
340
|
value: input.currency
|
|
336
|
-
}, _errorFactory)) && ("number" === typeof input.amount ||
|
|
341
|
+
}, _errorFactory)) && ("number" === typeof input.amount || _assertGuard_1._assertGuard(_exceptionable, {
|
|
337
342
|
method: "typia.createAssert",
|
|
338
343
|
path: _path + ".amount",
|
|
339
344
|
expected: "number",
|
|
340
345
|
value: input.amount
|
|
341
346
|
}, _errorFactory));
|
|
342
|
-
const _ao1 = (input, _path, _exceptionable = true) => ("entitlement" === input.type ||
|
|
347
|
+
const _ao1 = (input, _path, _exceptionable = true) => ("entitlement" === input.type || _assertGuard_1._assertGuard(_exceptionable, {
|
|
343
348
|
method: "typia.createAssert",
|
|
344
349
|
path: _path + ".type",
|
|
345
350
|
expected: "\"entitlement\"",
|
|
346
351
|
value: input.type
|
|
347
|
-
}, _errorFactory)) && ("string" === typeof input.entitlement ||
|
|
352
|
+
}, _errorFactory)) && ("string" === typeof input.entitlement || _assertGuard_1._assertGuard(_exceptionable, {
|
|
348
353
|
method: "typia.createAssert",
|
|
349
354
|
path: _path + ".entitlement",
|
|
350
355
|
expected: "string",
|
|
@@ -356,7 +361,7 @@ export const assertProductGrant = (() => {
|
|
|
356
361
|
else if ("entitlement" === input.type)
|
|
357
362
|
return _ao1(input, _path, true && _exceptionable);
|
|
358
363
|
else
|
|
359
|
-
return
|
|
364
|
+
return _assertGuard_1._assertGuard(_exceptionable, {
|
|
360
365
|
method: "typia.createAssert",
|
|
361
366
|
path: _path,
|
|
362
367
|
expected: _ae0,
|
|
@@ -378,12 +383,12 @@ export const assertProductGrant = (() => {
|
|
|
378
383
|
return (input, errorFactory) => {
|
|
379
384
|
if (false === __is(input)) {
|
|
380
385
|
_errorFactory = errorFactory;
|
|
381
|
-
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input ||
|
|
386
|
+
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _assertGuard_1._assertGuard(true, {
|
|
382
387
|
method: "typia.createAssert",
|
|
383
388
|
path: _path + "",
|
|
384
389
|
expected: _ae0,
|
|
385
390
|
value: input
|
|
386
|
-
}, _errorFactory)) && _au0(input, _path + "", true) ||
|
|
391
|
+
}, _errorFactory)) && _au0(input, _path + "", true) || _assertGuard_1._assertGuard(true, {
|
|
387
392
|
method: "typia.createAssert",
|
|
388
393
|
path: _path + "",
|
|
389
394
|
expected: _ae0,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mpgd/catalog",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Product catalog and ad placement configuration schemas for mpgd games.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -38,12 +38,12 @@
|
|
|
38
38
|
"placements.json"
|
|
39
39
|
],
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"typia": "
|
|
42
|
-
"@mpgd/platform": "0.
|
|
41
|
+
"typia": "13.0.2",
|
|
42
|
+
"@mpgd/platform": "0.6.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"ttsc": "0.
|
|
46
|
-
"typescript": "7.0.
|
|
45
|
+
"ttsc": "0.18.4",
|
|
46
|
+
"typescript": "7.0.2"
|
|
47
47
|
},
|
|
48
48
|
"main": "./dist/index.js",
|
|
49
49
|
"types": "./dist/index.d.ts",
|