@virjay/playscope-cocos 0.0.0-stage → 0.2.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.
Files changed (92) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/README.md +314 -2
  3. package/USAGE.md +372 -0
  4. package/VALIDATION.md +93 -0
  5. package/dist/adapters/levelplay/index.d.ts +15 -0
  6. package/dist/adapters/levelplay/index.js +14 -0
  7. package/dist/cocos/Storage.d.ts +16 -0
  8. package/dist/cocos/Storage.js +16 -0
  9. package/dist/cocos/XhrJsonTransport.d.ts +8 -0
  10. package/dist/cocos/XhrJsonTransport.js +65 -0
  11. package/dist/cocos/index.d.ts +48 -0
  12. package/dist/cocos/index.js +134 -0
  13. package/dist/core/ClientOwnership.d.ts +6 -0
  14. package/dist/core/ClientOwnership.js +39 -0
  15. package/dist/core/ClientScope.d.ts +5 -0
  16. package/dist/core/ClientScope.js +34 -0
  17. package/dist/core/ConfigurationSync.d.ts +18 -0
  18. package/dist/core/ConfigurationSync.js +66 -0
  19. package/dist/core/FactEncoding.d.ts +10 -0
  20. package/dist/core/FactEncoding.js +29 -0
  21. package/dist/core/HttpError.d.ts +10 -0
  22. package/dist/core/HttpError.js +17 -0
  23. package/dist/core/OutboxStore.d.ts +31 -0
  24. package/dist/core/OutboxStore.js +228 -0
  25. package/dist/core/PersistentState.d.ts +33 -0
  26. package/dist/core/PersistentState.js +92 -0
  27. package/dist/core/PlayScopeClient.d.ts +65 -0
  28. package/dist/core/PlayScopeClient.js +422 -0
  29. package/dist/core/QueueAdmission.d.ts +4 -0
  30. package/dist/core/QueueAdmission.js +29 -0
  31. package/dist/core/index.d.ts +7 -0
  32. package/dist/core/index.js +27 -0
  33. package/dist/core/revenue.d.ts +33 -0
  34. package/dist/core/revenue.js +23 -0
  35. package/dist/core/types.d.ts +155 -0
  36. package/dist/core/types.js +2 -0
  37. package/dist/core/uuid.d.ts +1 -0
  38. package/dist/core/uuid.js +9 -0
  39. package/dist/esm/adapters/levelplay/index.js +11 -0
  40. package/dist/esm/cocos/Storage.js +12 -0
  41. package/dist/esm/cocos/XhrJsonTransport.js +61 -0
  42. package/dist/esm/cocos/index.js +115 -0
  43. package/dist/esm/core/ClientOwnership.js +34 -0
  44. package/dist/esm/core/ClientScope.js +30 -0
  45. package/dist/esm/core/ConfigurationSync.js +62 -0
  46. package/dist/esm/core/FactEncoding.js +24 -0
  47. package/dist/esm/core/HttpError.js +12 -0
  48. package/dist/esm/core/OutboxStore.js +224 -0
  49. package/dist/esm/core/PersistentState.js +85 -0
  50. package/dist/esm/core/PlayScopeClient.js +415 -0
  51. package/dist/esm/core/QueueAdmission.js +25 -0
  52. package/dist/esm/core/index.js +7 -0
  53. package/dist/esm/core/revenue.js +20 -0
  54. package/dist/esm/core/types.js +1 -0
  55. package/dist/esm/core/uuid.js +6 -0
  56. package/dist/esm/package.json +1 -0
  57. package/dist/esm/protocols/game-v1/index.js +21 -0
  58. package/dist/protocols/game-v1/index.d.ts +8 -0
  59. package/dist/protocols/game-v1/index.js +25 -0
  60. package/doc/README.md +4 -0
  61. package/doc//344/275/277/347/224/250/346/214/207/345/215/227/README.md +585 -0
  62. package/doc//344/275/277/347/224/250/346/214/207/345/215/227//345/217/202/350/200/203/350/265/204/346/226/231/0.1.1-types/adapters/levelplay/index.d.ts +15 -0
  63. package/doc//344/275/277/347/224/250/346/214/207/345/215/227//345/217/202/350/200/203/350/265/204/346/226/231/0.1.1-types/cocos/Storage.d.ts +13 -0
  64. package/doc//344/275/277/347/224/250/346/214/207/345/215/227//345/217/202/350/200/203/350/265/204/346/226/231/0.1.1-types/cocos/XhrJsonTransport.d.ts +8 -0
  65. package/doc//344/275/277/347/224/250/346/214/207/345/215/227//345/217/202/350/200/203/350/265/204/346/226/231/0.1.1-types/cocos/index.d.ts +38 -0
  66. package/doc//344/275/277/347/224/250/346/214/207/345/215/227//345/217/202/350/200/203/350/265/204/346/226/231/0.1.1-types/core/PlayScopeClient.d.ts +46 -0
  67. package/doc//344/275/277/347/224/250/346/214/207/345/215/227//345/217/202/350/200/203/350/265/204/346/226/231/0.1.1-types/core/index.d.ts +3 -0
  68. package/doc//344/275/277/347/224/250/346/214/207/345/215/227//345/217/202/350/200/203/350/265/204/346/226/231/0.1.1-types/core/revenue.d.ts +25 -0
  69. package/doc//344/275/277/347/224/250/346/214/207/345/215/227//345/217/202/350/200/203/350/265/204/346/226/231/0.1.1-types/core/types.d.ts +81 -0
  70. package/doc//344/275/277/347/224/250/346/214/207/345/215/227//345/217/202/350/200/203/350/265/204/346/226/231/exports.json +89 -0
  71. package/doc//344/275/277/347/224/250/346/214/207/345/215/227//345/217/202/350/200/203/350/265/204/346/226/231/public-api.d.ts +281 -0
  72. package/doc//344/275/277/347/224/250/346/214/207/345/215/227//345/217/202/350/200/203/350/265/204/346/226/231//346/234/215/345/212/241/347/253/257/client-context.schema.json +103 -0
  73. package/doc//344/275/277/347/224/250/346/214/207/345/215/227//345/217/202/350/200/203/350/265/204/346/226/231//346/234/215/345/212/241/347/253/257/game-ad-properties.json +765 -0
  74. package/doc//344/275/277/347/224/250/346/214/207/345/215/227//345/217/202/350/200/203/350/265/204/346/226/231//346/234/215/345/212/241/347/253/257/game-builtin-properties.json +479 -0
  75. package/doc//344/275/277/347/224/250/346/214/207/345/215/227//345/217/202/350/200/203/350/265/204/346/226/231//346/234/215/345/212/241/347/253/257/game-event.json +278 -0
  76. package/doc//344/275/277/347/224/250/346/214/207/345/215/227//345/217/202/350/200/203/350/265/204/346/226/231//346/234/215/345/212/241/347/253/257/product-events.json +2878 -0
  77. package/doc//344/275/277/347/224/250/346/214/207/345/215/227//345/217/202/350/200/203/350/265/204/346/226/231//346/234/215/345/212/241/347/253/257/standard-contract.json +183 -0
  78. package/doc//344/275/277/347/224/250/346/214/207/345/215/227//345/217/202/350/200/203/350/265/204/346/226/231//346/234/215/345/212/241/347/253/257//344/272/247/345/223/201/344/272/213/344/273/266/347/264/242/345/274/225.md +87 -0
  79. package/doc//344/275/277/347/224/250/346/214/207/345/215/227//345/217/202/350/200/203/350/265/204/346/226/231//346/235/245/346/272/220/344/270/216/347/211/210/346/234/254.json +35 -0
  80. package/doc//344/275/277/347/224/250/346/214/207/345/215/227//347/244/272/344/276/213/CoreIntegration.ts +13 -0
  81. package/doc//344/275/277/347/224/250/346/214/207/345/215/227//347/244/272/344/276/213/LevelPlayTelemetry.ts +119 -0
  82. package/doc//344/275/277/347/224/250/346/214/207/345/215/227//347/244/272/344/276/213/PlayScopeExample.ts +46 -0
  83. package/doc//344/275/277/347/224/250/346/214/207/345/215/227//347/244/272/344/276/213/QuestGarden.ts +129 -0
  84. package/doc//344/275/277/347/224/250/346/214/207/345/215/227//347/244/272/344/276/213/README.md +23 -0
  85. package/doc//344/275/277/347/224/250/346/214/207/345/215/227//347/244/272/344/276/213/project-fixture.json +188 -0
  86. package/doc//344/275/277/347/224/250/346/214/207/345/215/227//347/244/272/344/276/213/tsconfig.json +20 -0
  87. package/examples/cocos-minimal/PlayScopeExample.ts +27 -0
  88. package/examples/quest-garden/QuestGarden.ts +129 -0
  89. package/examples/quest-garden/README.md +180 -0
  90. package/examples/quest-garden/project-fixture.json +188 -0
  91. package/examples/quest-garden/tsconfig.json +12 -0
  92. package/package.json +73 -4
@@ -0,0 +1,765 @@
1
+ {
2
+ "ad_request": {
3
+ "type": "object",
4
+ "properties": {
5
+ "placement": {
6
+ "type": "string",
7
+ "pattern": "^[a-zA-Z0-9._-]{1,64}$",
8
+ "not": {
9
+ "const": "unknown"
10
+ }
11
+ },
12
+ "ad_format": {
13
+ "type": "string",
14
+ "maxLength": 64
15
+ },
16
+ "ad_unit_id": {
17
+ "type": "string",
18
+ "maxLength": 128
19
+ }
20
+ },
21
+ "additionalProperties": true,
22
+ "required": [
23
+ "placement"
24
+ ]
25
+ },
26
+ "ad_load_success": {
27
+ "type": "object",
28
+ "properties": {
29
+ "placement": {
30
+ "type": "string",
31
+ "pattern": "^[a-zA-Z0-9._-]{1,64}$",
32
+ "not": {
33
+ "const": "unknown"
34
+ }
35
+ },
36
+ "ad_format": {
37
+ "type": "string",
38
+ "maxLength": 64
39
+ },
40
+ "ad_unit_id": {
41
+ "type": "string",
42
+ "maxLength": 128
43
+ }
44
+ },
45
+ "additionalProperties": true
46
+ },
47
+ "ad_load_fail": {
48
+ "type": "object",
49
+ "properties": {
50
+ "placement": {
51
+ "type": "string",
52
+ "pattern": "^[a-zA-Z0-9._-]{1,64}$",
53
+ "not": {
54
+ "const": "unknown"
55
+ }
56
+ },
57
+ "ad_format": {
58
+ "type": "string",
59
+ "maxLength": 64
60
+ },
61
+ "ad_unit_id": {
62
+ "type": "string",
63
+ "maxLength": 128
64
+ }
65
+ },
66
+ "additionalProperties": true
67
+ },
68
+ "ad_impression": {
69
+ "type": "object",
70
+ "properties": {
71
+ "placement": {
72
+ "type": "string",
73
+ "pattern": "^[a-zA-Z0-9._-]{1,64}$",
74
+ "not": {
75
+ "const": "unknown"
76
+ }
77
+ },
78
+ "ad_format": {
79
+ "type": "string",
80
+ "maxLength": 64
81
+ },
82
+ "ad_unit_id": {
83
+ "type": "string",
84
+ "maxLength": 128
85
+ }
86
+ },
87
+ "additionalProperties": true
88
+ },
89
+ "ad_click": {
90
+ "type": "object",
91
+ "properties": {
92
+ "placement": {
93
+ "type": "string",
94
+ "pattern": "^[a-zA-Z0-9._-]{1,64}$",
95
+ "not": {
96
+ "const": "unknown"
97
+ }
98
+ },
99
+ "ad_format": {
100
+ "type": "string",
101
+ "maxLength": 64
102
+ },
103
+ "ad_unit_id": {
104
+ "type": "string",
105
+ "maxLength": 128
106
+ }
107
+ },
108
+ "additionalProperties": true
109
+ },
110
+ "ad_rewarded_grant": {
111
+ "type": "object",
112
+ "properties": {
113
+ "placement": {
114
+ "type": "string",
115
+ "pattern": "^[a-zA-Z0-9._-]{1,64}$",
116
+ "not": {
117
+ "const": "unknown"
118
+ }
119
+ },
120
+ "ad_format": {
121
+ "type": "string",
122
+ "maxLength": 64
123
+ },
124
+ "ad_unit_id": {
125
+ "type": "string",
126
+ "maxLength": 128
127
+ }
128
+ },
129
+ "additionalProperties": true
130
+ },
131
+ "ad_skipped": {
132
+ "type": "object",
133
+ "properties": {
134
+ "placement": {
135
+ "type": "string",
136
+ "pattern": "^[a-zA-Z0-9._-]{1,64}$",
137
+ "not": {
138
+ "const": "unknown"
139
+ }
140
+ },
141
+ "ad_format": {
142
+ "type": "string",
143
+ "maxLength": 64
144
+ },
145
+ "ad_unit_id": {
146
+ "type": "string",
147
+ "maxLength": 128
148
+ }
149
+ },
150
+ "additionalProperties": true
151
+ },
152
+ "ad_close": {
153
+ "type": "object",
154
+ "properties": {
155
+ "placement": {
156
+ "type": "string",
157
+ "pattern": "^[a-zA-Z0-9._-]{1,64}$",
158
+ "not": {
159
+ "const": "unknown"
160
+ }
161
+ },
162
+ "ad_format": {
163
+ "type": "string",
164
+ "maxLength": 64
165
+ },
166
+ "ad_unit_id": {
167
+ "type": "string",
168
+ "maxLength": 128
169
+ }
170
+ },
171
+ "additionalProperties": true
172
+ },
173
+ "ad_request_bid": {
174
+ "type": "object",
175
+ "properties": {
176
+ "placement": {
177
+ "type": "string",
178
+ "pattern": "^[a-zA-Z0-9._-]{1,64}$",
179
+ "not": {
180
+ "const": "unknown"
181
+ }
182
+ },
183
+ "requested_networks": {
184
+ "type": "array",
185
+ "maxItems": 1000,
186
+ "items": {
187
+ "type": "string",
188
+ "maxLength": 256
189
+ }
190
+ },
191
+ "bid_responses": {
192
+ "type": "array",
193
+ "maxItems": 1000,
194
+ "items": {
195
+ "type": "object"
196
+ }
197
+ },
198
+ "winner_network": {
199
+ "type": "string",
200
+ "maxLength": 4096
201
+ },
202
+ "bid_price": {
203
+ "type": "number",
204
+ "minimum": 0
205
+ },
206
+ "ad_format": {
207
+ "type": "string",
208
+ "maxLength": 64
209
+ },
210
+ "ad_unit_id": {
211
+ "type": "string",
212
+ "maxLength": 128
213
+ }
214
+ },
215
+ "additionalProperties": true,
216
+ "required": [
217
+ "placement",
218
+ "requested_networks",
219
+ "bid_responses",
220
+ "winner_network",
221
+ "bid_price"
222
+ ]
223
+ },
224
+ "ad_no_fill": {
225
+ "type": "object",
226
+ "properties": {
227
+ "placement": {
228
+ "type": "string",
229
+ "pattern": "^[a-zA-Z0-9._-]{1,64}$",
230
+ "not": {
231
+ "const": "unknown"
232
+ }
233
+ },
234
+ "requested_networks": {
235
+ "type": "array",
236
+ "maxItems": 1000,
237
+ "items": {
238
+ "type": "string",
239
+ "maxLength": 256
240
+ }
241
+ },
242
+ "fill_rate_at_request": {
243
+ "type": "number",
244
+ "minimum": 0
245
+ },
246
+ "ad_format": {
247
+ "type": "string",
248
+ "maxLength": 64
249
+ },
250
+ "ad_unit_id": {
251
+ "type": "string",
252
+ "maxLength": 128
253
+ }
254
+ },
255
+ "additionalProperties": true,
256
+ "required": [
257
+ "placement",
258
+ "requested_networks",
259
+ "fill_rate_at_request"
260
+ ]
261
+ },
262
+ "ad_request_timeout": {
263
+ "type": "object",
264
+ "properties": {
265
+ "placement": {
266
+ "type": "string",
267
+ "pattern": "^[a-zA-Z0-9._-]{1,64}$",
268
+ "not": {
269
+ "const": "unknown"
270
+ }
271
+ },
272
+ "network": {
273
+ "type": "string",
274
+ "maxLength": 4096
275
+ },
276
+ "timeout_ms": {
277
+ "type": "integer",
278
+ "minimum": 0,
279
+ "maximum": 9007199254740991
280
+ },
281
+ "retry": {
282
+ "type": "integer",
283
+ "minimum": 0,
284
+ "maximum": 9007199254740991
285
+ },
286
+ "ad_format": {
287
+ "type": "string",
288
+ "maxLength": 64
289
+ },
290
+ "ad_unit_id": {
291
+ "type": "string",
292
+ "maxLength": 128
293
+ }
294
+ },
295
+ "additionalProperties": true,
296
+ "required": [
297
+ "placement",
298
+ "network",
299
+ "timeout_ms",
300
+ "retry"
301
+ ]
302
+ },
303
+ "ad_show": {
304
+ "type": "object",
305
+ "properties": {
306
+ "placement": {
307
+ "type": "string",
308
+ "pattern": "^[a-zA-Z0-9._-]{1,64}$",
309
+ "not": {
310
+ "const": "unknown"
311
+ }
312
+ },
313
+ "ad_unit_id": {
314
+ "type": "string",
315
+ "maxLength": 4096
316
+ },
317
+ "network": {
318
+ "type": "string",
319
+ "maxLength": 4096
320
+ },
321
+ "ad_format": {
322
+ "type": "string",
323
+ "maxLength": 64
324
+ },
325
+ "show_latency_ms": {
326
+ "type": "integer",
327
+ "minimum": 0,
328
+ "maximum": 9007199254740991
329
+ }
330
+ },
331
+ "additionalProperties": true,
332
+ "required": [
333
+ "placement",
334
+ "ad_unit_id",
335
+ "network",
336
+ "ad_format",
337
+ "show_latency_ms"
338
+ ]
339
+ },
340
+ "ad_first_quartile": {
341
+ "type": "object",
342
+ "properties": {
343
+ "placement": {
344
+ "type": "string",
345
+ "pattern": "^[a-zA-Z0-9._-]{1,64}$",
346
+ "not": {
347
+ "const": "unknown"
348
+ }
349
+ },
350
+ "network": {
351
+ "type": "string",
352
+ "maxLength": 4096
353
+ },
354
+ "ad_unit_id": {
355
+ "type": "string",
356
+ "maxLength": 4096
357
+ },
358
+ "quartile": {
359
+ "type": "integer",
360
+ "minimum": 0,
361
+ "maximum": 9007199254740991
362
+ },
363
+ "played_sec": {
364
+ "type": "number",
365
+ "minimum": 0
366
+ },
367
+ "ad_format": {
368
+ "type": "string",
369
+ "maxLength": 64
370
+ }
371
+ },
372
+ "additionalProperties": true,
373
+ "required": [
374
+ "placement",
375
+ "network",
376
+ "ad_unit_id",
377
+ "quartile",
378
+ "played_sec"
379
+ ]
380
+ },
381
+ "ad_midpoint": {
382
+ "type": "object",
383
+ "properties": {
384
+ "placement": {
385
+ "type": "string",
386
+ "pattern": "^[a-zA-Z0-9._-]{1,64}$",
387
+ "not": {
388
+ "const": "unknown"
389
+ }
390
+ },
391
+ "network": {
392
+ "type": "string",
393
+ "maxLength": 4096
394
+ },
395
+ "ad_unit_id": {
396
+ "type": "string",
397
+ "maxLength": 4096
398
+ },
399
+ "quartile": {
400
+ "type": "integer",
401
+ "minimum": 0,
402
+ "maximum": 9007199254740991
403
+ },
404
+ "played_sec": {
405
+ "type": "number",
406
+ "minimum": 0
407
+ },
408
+ "ad_format": {
409
+ "type": "string",
410
+ "maxLength": 64
411
+ }
412
+ },
413
+ "additionalProperties": true,
414
+ "required": [
415
+ "placement",
416
+ "network",
417
+ "ad_unit_id",
418
+ "quartile",
419
+ "played_sec"
420
+ ]
421
+ },
422
+ "ad_third_quartile": {
423
+ "type": "object",
424
+ "properties": {
425
+ "placement": {
426
+ "type": "string",
427
+ "pattern": "^[a-zA-Z0-9._-]{1,64}$",
428
+ "not": {
429
+ "const": "unknown"
430
+ }
431
+ },
432
+ "network": {
433
+ "type": "string",
434
+ "maxLength": 4096
435
+ },
436
+ "ad_unit_id": {
437
+ "type": "string",
438
+ "maxLength": 4096
439
+ },
440
+ "quartile": {
441
+ "type": "integer",
442
+ "minimum": 0,
443
+ "maximum": 9007199254740991
444
+ },
445
+ "played_sec": {
446
+ "type": "number",
447
+ "minimum": 0
448
+ },
449
+ "ad_format": {
450
+ "type": "string",
451
+ "maxLength": 64
452
+ }
453
+ },
454
+ "additionalProperties": true,
455
+ "required": [
456
+ "placement",
457
+ "network",
458
+ "ad_unit_id",
459
+ "quartile",
460
+ "played_sec"
461
+ ]
462
+ },
463
+ "ad_complete": {
464
+ "type": "object",
465
+ "properties": {
466
+ "placement": {
467
+ "type": "string",
468
+ "pattern": "^[a-zA-Z0-9._-]{1,64}$",
469
+ "not": {
470
+ "const": "unknown"
471
+ }
472
+ },
473
+ "network": {
474
+ "type": "string",
475
+ "maxLength": 4096
476
+ },
477
+ "ad_unit_id": {
478
+ "type": "string",
479
+ "maxLength": 4096
480
+ },
481
+ "played_sec": {
482
+ "type": "number",
483
+ "minimum": 0
484
+ },
485
+ "reward_granted": {
486
+ "enum": [
487
+ "yes",
488
+ "no"
489
+ ]
490
+ },
491
+ "ad_format": {
492
+ "type": "string",
493
+ "maxLength": 64
494
+ }
495
+ },
496
+ "additionalProperties": true,
497
+ "required": [
498
+ "placement",
499
+ "network",
500
+ "ad_unit_id",
501
+ "played_sec",
502
+ "reward_granted"
503
+ ]
504
+ },
505
+ "ad_landing_open": {
506
+ "type": "object",
507
+ "properties": {
508
+ "placement": {
509
+ "type": "string",
510
+ "pattern": "^[a-zA-Z0-9._-]{1,64}$",
511
+ "not": {
512
+ "const": "unknown"
513
+ }
514
+ },
515
+ "ad_unit_id": {
516
+ "type": "string",
517
+ "maxLength": 4096
518
+ },
519
+ "landing_type": {
520
+ "enum": [
521
+ "store",
522
+ "web"
523
+ ]
524
+ },
525
+ "ad_format": {
526
+ "type": "string",
527
+ "maxLength": 64
528
+ }
529
+ },
530
+ "additionalProperties": true,
531
+ "required": [
532
+ "placement",
533
+ "ad_unit_id",
534
+ "landing_type"
535
+ ]
536
+ },
537
+ "ad_landing_return": {
538
+ "type": "object",
539
+ "properties": {
540
+ "placement": {
541
+ "type": "string",
542
+ "pattern": "^[a-zA-Z0-9._-]{1,64}$",
543
+ "not": {
544
+ "const": "unknown"
545
+ }
546
+ },
547
+ "return_within_sec": {
548
+ "type": "number",
549
+ "minimum": 0
550
+ },
551
+ "action_after_return": {
552
+ "type": "string",
553
+ "maxLength": 4096
554
+ },
555
+ "ad_format": {
556
+ "type": "string",
557
+ "maxLength": 64
558
+ },
559
+ "ad_unit_id": {
560
+ "type": "string",
561
+ "maxLength": 128
562
+ }
563
+ },
564
+ "additionalProperties": true,
565
+ "required": [
566
+ "placement",
567
+ "return_within_sec",
568
+ "action_after_return"
569
+ ]
570
+ },
571
+ "ad_revenue": {
572
+ "type": "object",
573
+ "properties": {
574
+ "placement": {
575
+ "type": "string",
576
+ "pattern": "^[a-zA-Z0-9._-]{1,64}$",
577
+ "not": {
578
+ "const": "unknown"
579
+ }
580
+ },
581
+ "ad_unit_id": {
582
+ "type": "string",
583
+ "maxLength": 4096
584
+ },
585
+ "network": {
586
+ "type": "string",
587
+ "maxLength": 4096
588
+ },
589
+ "revenue": {
590
+ "type": "number",
591
+ "minimum": 0
592
+ },
593
+ "currency": {
594
+ "type": "string",
595
+ "maxLength": 4096
596
+ },
597
+ "exchange_rate_usd": {
598
+ "type": "number",
599
+ "minimum": 0
600
+ },
601
+ "ad_format": {
602
+ "type": "string",
603
+ "maxLength": 64
604
+ }
605
+ },
606
+ "additionalProperties": true,
607
+ "required": [
608
+ "placement",
609
+ "ad_unit_id",
610
+ "network",
611
+ "revenue",
612
+ "currency",
613
+ "exchange_rate_usd"
614
+ ]
615
+ },
616
+ "ad_payout": {
617
+ "type": "object",
618
+ "properties": {
619
+ "placement": {
620
+ "type": "string",
621
+ "pattern": "^[a-zA-Z0-9._-]{1,64}$",
622
+ "not": {
623
+ "const": "unknown"
624
+ }
625
+ },
626
+ "network": {
627
+ "type": "string",
628
+ "maxLength": 4096
629
+ },
630
+ "gross_revenue": {
631
+ "type": "number",
632
+ "minimum": 0
633
+ },
634
+ "platform_share": {
635
+ "type": "number",
636
+ "minimum": 0
637
+ },
638
+ "net_revenue": {
639
+ "type": "number",
640
+ "minimum": 0
641
+ },
642
+ "currency": {
643
+ "type": "string",
644
+ "maxLength": 4096
645
+ },
646
+ "ad_format": {
647
+ "type": "string",
648
+ "maxLength": 64
649
+ },
650
+ "ad_unit_id": {
651
+ "type": "string",
652
+ "maxLength": 128
653
+ }
654
+ },
655
+ "additionalProperties": true,
656
+ "required": [
657
+ "placement",
658
+ "network",
659
+ "gross_revenue",
660
+ "platform_share",
661
+ "net_revenue",
662
+ "currency"
663
+ ]
664
+ },
665
+ "ad_ecpm": {
666
+ "type": "object",
667
+ "properties": {
668
+ "placement": {
669
+ "type": "string",
670
+ "pattern": "^[a-zA-Z0-9._-]{1,64}$",
671
+ "not": {
672
+ "const": "unknown"
673
+ }
674
+ },
675
+ "network": {
676
+ "type": "string",
677
+ "maxLength": 4096
678
+ },
679
+ "country": {
680
+ "type": "string",
681
+ "maxLength": 4096
682
+ },
683
+ "ecpm_usd": {
684
+ "type": "number",
685
+ "minimum": 0
686
+ },
687
+ "impressions": {
688
+ "type": "integer",
689
+ "minimum": 0,
690
+ "maximum": 9007199254740991
691
+ },
692
+ "ad_count": {
693
+ "type": "integer",
694
+ "minimum": 0,
695
+ "maximum": 9007199254740991
696
+ },
697
+ "ad_format": {
698
+ "type": "string",
699
+ "maxLength": 64
700
+ },
701
+ "ad_unit_id": {
702
+ "type": "string",
703
+ "maxLength": 128
704
+ }
705
+ },
706
+ "additionalProperties": true,
707
+ "required": [
708
+ "placement",
709
+ "network",
710
+ "country",
711
+ "ecpm_usd",
712
+ "impressions",
713
+ "ad_count"
714
+ ]
715
+ },
716
+ "ad_freq_cap_hit": {
717
+ "type": "object",
718
+ "properties": {
719
+ "placement": {
720
+ "type": "string",
721
+ "pattern": "^[a-zA-Z0-9._-]{1,64}$",
722
+ "not": {
723
+ "const": "unknown"
724
+ }
725
+ },
726
+ "user_id": {
727
+ "type": "string",
728
+ "maxLength": 4096
729
+ },
730
+ "cap_type": {
731
+ "enum": [
732
+ "level",
733
+ "session",
734
+ "day"
735
+ ]
736
+ },
737
+ "cap_value": {
738
+ "type": "integer",
739
+ "minimum": 0,
740
+ "maximum": 9007199254740991
741
+ },
742
+ "hit_count": {
743
+ "type": "integer",
744
+ "minimum": 0,
745
+ "maximum": 9007199254740991
746
+ },
747
+ "ad_format": {
748
+ "type": "string",
749
+ "maxLength": 64
750
+ },
751
+ "ad_unit_id": {
752
+ "type": "string",
753
+ "maxLength": 128
754
+ }
755
+ },
756
+ "additionalProperties": true,
757
+ "required": [
758
+ "placement",
759
+ "user_id",
760
+ "cap_type",
761
+ "cap_value",
762
+ "hit_count"
763
+ ]
764
+ }
765
+ }