@live-change/db-server 0.6.23 → 0.7.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.
@@ -0,0 +1,1796 @@
1
+ {
2
+ "databases": {
3
+ "system": {
4
+ "tables": {
5
+ "test_tables": {
6
+ "uid": "aec5e4fee7945f44"
7
+ },
8
+ "test_logs": {
9
+ "uid": "b9d58c27ee68126b"
10
+ },
11
+ "test_indexes": {
12
+ "uid": "835127075c6fe780"
13
+ }
14
+ },
15
+ "indexes": {},
16
+ "logs": {}
17
+ },
18
+ "test": {
19
+ "tables": {
20
+ "services": {
21
+ "uid": "ec2f561f74519685"
22
+ },
23
+ "eventConsumers": {
24
+ "uid": "36213ae135ac50ac"
25
+ },
26
+ "eventReports": {
27
+ "uid": "40b798a296daa349"
28
+ },
29
+ "commands": {
30
+ "uid": "82a1e0d9a82f87e8"
31
+ },
32
+ "triggers": {
33
+ "uid": "64e295fe32175f38"
34
+ },
35
+ "session_Session": {
36
+ "uid": "e567ac2b7428affa"
37
+ },
38
+ "user_User": {
39
+ "uid": "f8e52a32b0072eef"
40
+ },
41
+ "user_AuthenticatedUser": {
42
+ "uid": "efa234936cde9a88"
43
+ },
44
+ "email_SentEmail": {
45
+ "uid": "cbc0b1188054bb1b"
46
+ },
47
+ "email_Email": {
48
+ "uid": "9c0cb86653493a44"
49
+ },
50
+ "passwordAuthentication_PasswordAuthentication": {
51
+ "uid": "c9104f5f418824ce"
52
+ },
53
+ "passwordAuthentication_ResetPasswordAuthentication": {
54
+ "uid": "b6d0fdb48bd5093b"
55
+ },
56
+ "userIdentification_Identification": {
57
+ "uid": "196723830cfefc2d"
58
+ },
59
+ "accessControl_Access": {
60
+ "uid": "ae8541ec0ac6373b"
61
+ },
62
+ "accessControl_PublicAccess": {
63
+ "uid": "41683c801f4ba10b"
64
+ },
65
+ "accessControl_AccessRequest": {
66
+ "uid": "b3b8f48d09fff4c3"
67
+ },
68
+ "accessControl_AccessInvitation": {
69
+ "uid": "3b2a025d37696e4b"
70
+ },
71
+ "security_Ban": {
72
+ "uid": "cb076ad55d3aeb75"
73
+ },
74
+ "security_Event": {
75
+ "uid": "9a043cc0031b884f"
76
+ },
77
+ "notification_Notification": {
78
+ "uid": "6f4f8d1f8ac5f124"
79
+ },
80
+ "notification_NotificationSetting": {
81
+ "uid": "96644f7271b49789"
82
+ },
83
+ "upload_Upload": {
84
+ "uid": "356f65294f229ae4"
85
+ },
86
+ "image_Image": {
87
+ "uid": "21ada0654c86b0e4"
88
+ },
89
+ "secretCode_Code": {
90
+ "uid": "db80a18ab7ac2e45"
91
+ },
92
+ "secretLink_Link": {
93
+ "uid": "197300ba086bd657"
94
+ },
95
+ "url_Canonical": {
96
+ "uid": "e697f624bee5727d"
97
+ },
98
+ "url_Redirect": {
99
+ "uid": "344d9fc03a84ccf6"
100
+ },
101
+ "prosemirror_Document": {
102
+ "uid": "2ac91b8435d8e7c4"
103
+ },
104
+ "prosemirror_StepsBucket": {
105
+ "uid": "280395fa7806f817"
106
+ },
107
+ "prosemirror_Snapshot": {
108
+ "uid": "c3718c6567e81886"
109
+ },
110
+ "content_Content": {
111
+ "uid": "22e8717402969862"
112
+ },
113
+ "content_AdditionalContent": {
114
+ "uid": "dab40a3b6432fdd3"
115
+ },
116
+ "content_Page": {
117
+ "uid": "e4bd3120e5c4b604"
118
+ },
119
+ "content_Metadata": {
120
+ "uid": "a55b2c63f3a4241f"
121
+ },
122
+ "googleAuthentication_Login": {
123
+ "uid": "a46be51c5636f95a"
124
+ },
125
+ "smsapi_SentSms": {
126
+ "uid": "a4f557d28e7fea00"
127
+ },
128
+ "smsapi_Phone": {
129
+ "uid": "05f6e5ac5af47fc6"
130
+ },
131
+ "smsConfirm_Code": {
132
+ "uid": "308549a6db403717"
133
+ },
134
+ "adsApi_ApiAccess": {
135
+ "uid": "9cb2c5ca1bd1560b"
136
+ },
137
+ "adsApi_Account": {
138
+ "uid": "d10fdd5dc8e41e53"
139
+ },
140
+ "adsApi_UserOwnedAccount": {
141
+ "uid": "015a2dcdfa95a318"
142
+ },
143
+ "adsApi_UserState": {
144
+ "uid": "6b80bd1ccaed3af3"
145
+ },
146
+ "adsApi_Campaign": {
147
+ "uid": "d00237c635692313"
148
+ },
149
+ "urlChecker_Checker": {
150
+ "uid": "9796084abd48a57d"
151
+ },
152
+ "urlChecker_Check": {
153
+ "uid": "628f6560b582675b"
154
+ },
155
+ "xmlAlert_Scanner": {
156
+ "uid": "96d2d57cffe76142"
157
+ },
158
+ "xmlAlert_Scan": {
159
+ "uid": "8bc5fb0585a48d01"
160
+ },
161
+ "xmlAlert_Result": {
162
+ "uid": "95a571a4f322ea54"
163
+ },
164
+ "xmlSearch_DataSet": {
165
+ "uid": "c1ce8678ed35881e"
166
+ },
167
+ "xmlSearch_Search": {
168
+ "uid": "9356c81a9ba34ef1"
169
+ },
170
+ "xmlSearch_Generator": {
171
+ "uid": "f1c4f8a441a4ffab"
172
+ },
173
+ "xmlExclusions_ExclusionsList": {
174
+ "uid": "f1c91fe74956edff"
175
+ },
176
+ "xmlExclusions_ExclusionsCheck": {
177
+ "uid": "7b5afdc70babcecc"
178
+ },
179
+ "security_relations": {
180
+ "uid": "e1be0eefa96fac00"
181
+ },
182
+ "messageAuthentication_Authentication": {
183
+ "uid": "b39108a96e4ee5fd"
184
+ },
185
+ "triggerRoutes": {
186
+ "uid": "db6a347cf8183191"
187
+ }
188
+ },
189
+ "indexes": {
190
+ "user_AuthenticatedUser_byUser": {
191
+ "code": "(async function(input, output, { table, properties }) {\n const mapper = (obj) => ({\n id: properties.map(path => {\n let at = obj\n for(const p of path) at = at && at[p]\n return at === undefined ? '' : JSON.stringify(at)\n }).join(':')+'_'+obj.id,\n to: obj.id\n })\n await input.table(table).onChange((obj, oldObj) =>\n output.change(obj && mapper(obj), oldObj && mapper(oldObj)) )\n })",
192
+ "parameters": {
193
+ "properties": [
194
+ [
195
+ "user"
196
+ ]
197
+ ],
198
+ "table": "user_AuthenticatedUser"
199
+ },
200
+ "uid": "e033a94807d99402",
201
+ "sources": [
202
+ {
203
+ "type": "table",
204
+ "name": "user_AuthenticatedUser"
205
+ }
206
+ ]
207
+ },
208
+ "email_Email_byUser": {
209
+ "code": "(async function(input, output, { table, properties }) {\n const mapper = (obj) => ({\n id: properties.map(path => {\n let at = obj\n for(const p of path) at = at && at[p]\n return at === undefined ? '' : JSON.stringify(at)\n }).join(':')+'_'+obj.id,\n to: obj.id\n })\n await input.table(table).onChange((obj, oldObj) =>\n output.change(obj && mapper(obj), oldObj && mapper(oldObj)) )\n })",
210
+ "parameters": {
211
+ "properties": [
212
+ [
213
+ "user"
214
+ ]
215
+ ],
216
+ "table": "email_Email"
217
+ },
218
+ "uid": "f2e35962a72ec43a",
219
+ "sources": [
220
+ {
221
+ "type": "table",
222
+ "name": "email_Email"
223
+ }
224
+ ]
225
+ },
226
+ "passwordAuthentication_PasswordAuthentication_byUser": {
227
+ "code": "(async function(input, output, { table, properties }) {\n const mapper = (obj) => ({\n id: properties.map(path => {\n let at = obj\n for(const p of path) at = at && at[p]\n return at === undefined ? '' : JSON.stringify(at)\n }).join(':')+'_'+obj.id,\n to: obj.id\n })\n await input.table(table).onChange((obj, oldObj) =>\n output.change(obj && mapper(obj), oldObj && mapper(oldObj)) )\n })",
228
+ "parameters": {
229
+ "properties": [
230
+ [
231
+ "user"
232
+ ]
233
+ ],
234
+ "table": "passwordAuthentication_PasswordAuthentication"
235
+ },
236
+ "uid": "89c6b802b7906a47",
237
+ "sources": [
238
+ {
239
+ "type": "table",
240
+ "name": "passwordAuthentication_PasswordAuthentication"
241
+ }
242
+ ]
243
+ },
244
+ "passwordAuthentication_ResetPasswordAuthentication_byUser": {
245
+ "code": "(async function(input, output, { table, properties }) {\n const mapper = (obj) => ({\n id: properties.map(path => {\n let at = obj\n for(const p of path) at = at && at[p]\n return at === undefined ? '' : JSON.stringify(at)\n }).join(':')+'_'+obj.id,\n to: obj.id\n })\n await input.table(table).onChange((obj, oldObj) =>\n output.change(obj && mapper(obj), oldObj && mapper(oldObj)) )\n })",
246
+ "parameters": {
247
+ "properties": [
248
+ [
249
+ "user"
250
+ ]
251
+ ],
252
+ "table": "passwordAuthentication_ResetPasswordAuthentication"
253
+ },
254
+ "uid": "9576895771ab307f",
255
+ "sources": [
256
+ {
257
+ "type": "table",
258
+ "name": "passwordAuthentication_ResetPasswordAuthentication"
259
+ }
260
+ ]
261
+ },
262
+ "accessControl_Access_bySessionOrUser": {
263
+ "code": "(async function(input, output, { table, properties }) {\n const mapper = (obj) => ({\n id: properties.map(path => {\n let at = obj\n for(const p of path) at = at && at[p]\n return at === undefined ? '' : JSON.stringify(at)\n }).join(':')+'_'+obj.id,\n to: obj.id\n })\n await input.table(table).onChange((obj, oldObj) =>\n output.change(obj && mapper(obj), oldObj && mapper(oldObj)) )\n })",
264
+ "parameters": {
265
+ "properties": [
266
+ [
267
+ "sessionOrUserType"
268
+ ],
269
+ [
270
+ "sessionOrUser"
271
+ ]
272
+ ],
273
+ "table": "accessControl_Access"
274
+ },
275
+ "uid": "cb2e5d46e2a85900",
276
+ "sources": [
277
+ {
278
+ "type": "table",
279
+ "name": "accessControl_Access"
280
+ }
281
+ ]
282
+ },
283
+ "accessControl_Access_byObject": {
284
+ "code": "(async function(input, output, { table, properties }) {\n const mapper = (obj) => ({\n id: properties.map(path => {\n let at = obj\n for(const p of path) at = at && at[p]\n return at === undefined ? '' : JSON.stringify(at)\n }).join(':')+'_'+obj.id,\n to: obj.id\n })\n await input.table(table).onChange((obj, oldObj) =>\n output.change(obj && mapper(obj), oldObj && mapper(oldObj)) )\n })",
285
+ "parameters": {
286
+ "properties": [
287
+ [
288
+ "objectType"
289
+ ],
290
+ [
291
+ "object"
292
+ ]
293
+ ],
294
+ "table": "accessControl_Access"
295
+ },
296
+ "uid": "a912f1f86cc99e1b",
297
+ "sources": [
298
+ {
299
+ "type": "table",
300
+ "name": "accessControl_Access"
301
+ }
302
+ ]
303
+ },
304
+ "accessControl_AccessRequest_bySessionOrUser": {
305
+ "code": "(async function(input, output, { table, properties }) {\n const mapper = (obj) => ({\n id: properties.map(path => {\n let at = obj\n for(const p of path) at = at && at[p]\n return at === undefined ? '' : JSON.stringify(at)\n }).join(':')+'_'+obj.id,\n to: obj.id\n })\n await input.table(table).onChange((obj, oldObj) =>\n output.change(obj && mapper(obj), oldObj && mapper(oldObj)) )\n })",
306
+ "parameters": {
307
+ "properties": [
308
+ [
309
+ "sessionOrUserType"
310
+ ],
311
+ [
312
+ "sessionOrUser"
313
+ ]
314
+ ],
315
+ "table": "accessControl_AccessRequest"
316
+ },
317
+ "uid": "087a0fbe696e1316",
318
+ "sources": [
319
+ {
320
+ "type": "table",
321
+ "name": "accessControl_AccessRequest"
322
+ }
323
+ ]
324
+ },
325
+ "accessControl_AccessRequest_byObject": {
326
+ "code": "(async function(input, output, { table, properties }) {\n const mapper = (obj) => ({\n id: properties.map(path => {\n let at = obj\n for(const p of path) at = at && at[p]\n return at === undefined ? '' : JSON.stringify(at)\n }).join(':')+'_'+obj.id,\n to: obj.id\n })\n await input.table(table).onChange((obj, oldObj) =>\n output.change(obj && mapper(obj), oldObj && mapper(oldObj)) )\n })",
327
+ "parameters": {
328
+ "properties": [
329
+ [
330
+ "objectType"
331
+ ],
332
+ [
333
+ "object"
334
+ ]
335
+ ],
336
+ "table": "accessControl_AccessRequest"
337
+ },
338
+ "uid": "252a3e4f2ec04d00",
339
+ "sources": [
340
+ {
341
+ "type": "table",
342
+ "name": "accessControl_AccessRequest"
343
+ }
344
+ ]
345
+ },
346
+ "accessControl_AccessInvitation_byContactOrUser": {
347
+ "code": "(async function(input, output, { table, properties }) {\n const mapper = (obj) => ({\n id: properties.map(path => {\n let at = obj\n for(const p of path) at = at && at[p]\n return at === undefined ? '' : JSON.stringify(at)\n }).join(':')+'_'+obj.id,\n to: obj.id\n })\n await input.table(table).onChange((obj, oldObj) =>\n output.change(obj && mapper(obj), oldObj && mapper(oldObj)) )\n })",
348
+ "parameters": {
349
+ "properties": [
350
+ [
351
+ "contactOrUserType"
352
+ ],
353
+ [
354
+ "contactOrUser"
355
+ ]
356
+ ],
357
+ "table": "accessControl_AccessInvitation"
358
+ },
359
+ "uid": "78b925fa4ff12fc8",
360
+ "sources": [
361
+ {
362
+ "type": "table",
363
+ "name": "accessControl_AccessInvitation"
364
+ }
365
+ ]
366
+ },
367
+ "accessControl_AccessInvitation_byObject": {
368
+ "code": "(async function(input, output, { table, properties }) {\n const mapper = (obj) => ({\n id: properties.map(path => {\n let at = obj\n for(const p of path) at = at && at[p]\n return at === undefined ? '' : JSON.stringify(at)\n }).join(':')+'_'+obj.id,\n to: obj.id\n })\n await input.table(table).onChange((obj, oldObj) =>\n output.change(obj && mapper(obj), oldObj && mapper(oldObj)) )\n })",
369
+ "parameters": {
370
+ "properties": [
371
+ [
372
+ "objectType"
373
+ ],
374
+ [
375
+ "object"
376
+ ]
377
+ ],
378
+ "table": "accessControl_AccessInvitation"
379
+ },
380
+ "uid": "d8f387a5a63ebe7e",
381
+ "sources": [
382
+ {
383
+ "type": "table",
384
+ "name": "accessControl_AccessInvitation"
385
+ }
386
+ ]
387
+ },
388
+ "notification_Notification_bySessionOrUser": {
389
+ "code": "(async function(input, output, { table, properties }) {\n const mapper = (obj) => ({\n id: properties.map(path => {\n let at = obj\n for(const p of path) at = at && at[p]\n return at === undefined ? '' : JSON.stringify(at)\n }).join(':')+'_'+obj.id,\n to: obj.id\n })\n await input.table(table).onChange((obj, oldObj) =>\n output.change(obj && mapper(obj), oldObj && mapper(oldObj)) )\n })",
390
+ "parameters": {
391
+ "properties": [
392
+ [
393
+ "sessionOrUserType"
394
+ ],
395
+ [
396
+ "sessionOrUser"
397
+ ]
398
+ ],
399
+ "table": "notification_Notification"
400
+ },
401
+ "uid": "ed5858bed81e7e5d",
402
+ "sources": [
403
+ {
404
+ "type": "table",
405
+ "name": "notification_Notification"
406
+ }
407
+ ]
408
+ },
409
+ "notification_Notification_bySessionOrUserAndTime": {
410
+ "code": "(async function(input, output, { table, properties }) {\n const mapper = (obj) => ({\n id: properties.map(path => {\n let at = obj\n for(const p of path) at = at && at[p]\n return at === undefined ? '' : JSON.stringify(at)\n }).join(':')+'_'+obj.id,\n to: obj.id\n })\n await input.table(table).onChange((obj, oldObj) =>\n output.change(obj && mapper(obj), oldObj && mapper(oldObj)) )\n })",
411
+ "parameters": {
412
+ "properties": [
413
+ [
414
+ "sessionOrUserType"
415
+ ],
416
+ [
417
+ "sessionOrUser"
418
+ ],
419
+ [
420
+ "time"
421
+ ]
422
+ ],
423
+ "table": "notification_Notification"
424
+ },
425
+ "uid": "b922496b88a4703e",
426
+ "sources": [
427
+ {
428
+ "type": "table",
429
+ "name": "notification_Notification"
430
+ }
431
+ ]
432
+ },
433
+ "notification_Notification_bySessionOrUserAndReadState": {
434
+ "code": "(async function(input, output, { table, properties }) {\n const mapper = (obj) => ({\n id: properties.map(path => {\n let at = obj\n for(const p of path) at = at && at[p]\n return at === undefined ? '' : JSON.stringify(at)\n }).join(':')+'_'+obj.id,\n to: obj.id\n })\n await input.table(table).onChange((obj, oldObj) =>\n output.change(obj && mapper(obj), oldObj && mapper(oldObj)) )\n })",
435
+ "parameters": {
436
+ "properties": [
437
+ [
438
+ "sessionOrUserType"
439
+ ],
440
+ [
441
+ "sessionOrUser"
442
+ ],
443
+ [
444
+ "readState"
445
+ ]
446
+ ],
447
+ "table": "notification_Notification"
448
+ },
449
+ "uid": "89d97bf5fc2cc4f2",
450
+ "sources": [
451
+ {
452
+ "type": "table",
453
+ "name": "notification_Notification"
454
+ }
455
+ ]
456
+ },
457
+ "notification_NotificationSetting_byContact": {
458
+ "code": "(async function(input, output, { table, properties }) {\n const mapper = (obj) => ({\n id: properties.map(path => {\n let at = obj\n for(const p of path) at = at && at[p]\n return at === undefined ? '' : JSON.stringify(at)\n }).join(':')+'_'+obj.id,\n to: obj.id\n })\n await input.table(table).onChange((obj, oldObj) =>\n output.change(obj && mapper(obj), oldObj && mapper(oldObj)) )\n })",
459
+ "parameters": {
460
+ "properties": [
461
+ [
462
+ "contactType"
463
+ ],
464
+ [
465
+ "contact"
466
+ ]
467
+ ],
468
+ "table": "notification_NotificationSetting"
469
+ },
470
+ "uid": "64996dd411261a28",
471
+ "sources": [
472
+ {
473
+ "type": "table",
474
+ "name": "notification_NotificationSetting"
475
+ }
476
+ ]
477
+ },
478
+ "notification_NotificationSetting_byNotification": {
479
+ "code": "(async function(input, output, { table, properties }) {\n const mapper = (obj) => ({\n id: properties.map(path => {\n let at = obj\n for(const p of path) at = at && at[p]\n return at === undefined ? '' : JSON.stringify(at)\n }).join(':')+'_'+obj.id,\n to: obj.id\n })\n await input.table(table).onChange((obj, oldObj) =>\n output.change(obj && mapper(obj), oldObj && mapper(oldObj)) )\n })",
480
+ "parameters": {
481
+ "properties": [
482
+ [
483
+ "notificationType"
484
+ ],
485
+ [
486
+ "notification"
487
+ ]
488
+ ],
489
+ "table": "notification_NotificationSetting"
490
+ },
491
+ "uid": "bf701d67f482906d",
492
+ "sources": [
493
+ {
494
+ "type": "table",
495
+ "name": "notification_NotificationSetting"
496
+ }
497
+ ]
498
+ },
499
+ "image_Image_byOwner": {
500
+ "code": "(async function(input, output, { table, properties }) {\n const mapper = (obj) => ({\n id: properties.map(path => {\n let at = obj\n for(const p of path) at = at && at[p]\n return at === undefined ? '' : JSON.stringify(at)\n }).join(':')+'_'+obj.id,\n to: obj.id\n })\n await input.table(table).onChange((obj, oldObj) =>\n output.change(obj && mapper(obj), oldObj && mapper(oldObj)) )\n })",
501
+ "parameters": {
502
+ "properties": [
503
+ [
504
+ "ownerType"
505
+ ],
506
+ [
507
+ "owner"
508
+ ]
509
+ ],
510
+ "table": "image_Image"
511
+ },
512
+ "uid": "17fb2bf2e66dba1b",
513
+ "sources": [
514
+ {
515
+ "type": "table",
516
+ "name": "image_Image"
517
+ }
518
+ ]
519
+ },
520
+ "url_Redirect_byTarget": {
521
+ "code": "(async function(input, output, { table, properties }) {\n const mapper = (obj) => ({\n id: properties.map(path => {\n let at = obj\n for(const p of path) at = at && at[p]\n return at === undefined ? '' : JSON.stringify(at)\n }).join(':')+'_'+obj.id,\n to: obj.id\n })\n await input.table(table).onChange((obj, oldObj) =>\n output.change(obj && mapper(obj), oldObj && mapper(oldObj)) )\n })",
522
+ "parameters": {
523
+ "properties": [
524
+ [
525
+ "targetType"
526
+ ],
527
+ [
528
+ "target"
529
+ ]
530
+ ],
531
+ "table": "url_Redirect"
532
+ },
533
+ "uid": "97e06555d1b9f552",
534
+ "sources": [
535
+ {
536
+ "type": "table",
537
+ "name": "url_Redirect"
538
+ }
539
+ ]
540
+ },
541
+ "url_Urls": {
542
+ "code": "(async function(input, output) {\n const urlMapper = urlType => ({targetType, domain, path, target}) =>\n ({\n id: `\"${targetType}\":${JSON.stringify(domain)}:${JSON.stringify(path)}_\"${target}\"`,\n target, domain, path,\n type: urlType\n })\n const redirectMapper = urlMapper('redirect')\n const canonicalMapper = urlMapper('canonical')\n await input.table('url_Redirect').onChange(\n (obj, oldObj) => output.change(obj && redirectMapper(obj), oldObj && redirectMapper(oldObj))\n )\n await input.table('url_Canonical').onChange(\n (obj, oldObj) => output.change(obj && canonicalMapper(obj), oldObj && canonicalMapper(oldObj))\n )\n })",
543
+ "parameters": {},
544
+ "uid": "76a95c047e45d6c2",
545
+ "sources": [
546
+ {
547
+ "type": "table",
548
+ "name": "url_Redirect"
549
+ },
550
+ {
551
+ "type": "table",
552
+ "name": "url_Canonical"
553
+ }
554
+ ]
555
+ },
556
+ "url_UrlsWithoutDomain": {
557
+ "code": "(async function(input, output) {\n const urlMapper = urlType => ({targetType, domain, path, target}) =>\n ({\n id: `\"${targetType}\":${JSON.stringify(path)}_\"${target}\"`,\n target, domain, path,\n type: urlType\n })\n const redirectMapper = urlMapper('redirect')\n const canonicalMapper = urlMapper('canonical')\n await input.table('url_Redirect').onChange(\n (obj, oldObj) => output.change(obj && redirectMapper(obj), oldObj && redirectMapper(oldObj))\n )\n await input.table('url_Canonical').onChange(\n (obj, oldObj) => output.change(obj && canonicalMapper(obj), oldObj && canonicalMapper(oldObj))\n )\n })",
558
+ "parameters": {},
559
+ "uid": "c2748b4e10a13d9e",
560
+ "sources": [
561
+ {
562
+ "type": "table",
563
+ "name": "url_Redirect"
564
+ },
565
+ {
566
+ "type": "table",
567
+ "name": "url_Canonical"
568
+ }
569
+ ]
570
+ },
571
+ "content_AdditionalContent_byContent": {
572
+ "code": "(async function(input, output, { table, properties }) {\n const mapper = (obj) => ({\n id: properties.map(path => {\n let at = obj\n for(const p of path) at = at && at[p]\n return at === undefined ? '' : JSON.stringify(at)\n }).join(':')+'_'+obj.id,\n to: obj.id\n })\n await input.table(table).onChange((obj, oldObj) =>\n output.change(obj && mapper(obj), oldObj && mapper(oldObj)) )\n })",
573
+ "parameters": {
574
+ "properties": [
575
+ [
576
+ "content"
577
+ ]
578
+ ],
579
+ "table": "content_AdditionalContent"
580
+ },
581
+ "uid": "a0db5901ac826c3b",
582
+ "sources": [
583
+ {
584
+ "type": "table",
585
+ "name": "content_AdditionalContent"
586
+ }
587
+ ]
588
+ },
589
+ "smsapi_Phone_byUser": {
590
+ "code": "(async function(input, output, { table, properties }) {\n const mapper = (obj) => ({\n id: properties.map(path => {\n let at = obj\n for(const p of path) at = at && at[p]\n return at === undefined ? '' : JSON.stringify(at)\n }).join(':')+'_'+obj.id,\n to: obj.id\n })\n await input.table(table).onChange((obj, oldObj) =>\n output.change(obj && mapper(obj), oldObj && mapper(oldObj)) )\n })",
591
+ "parameters": {
592
+ "properties": [
593
+ [
594
+ "user"
595
+ ]
596
+ ],
597
+ "table": "smsapi_Phone"
598
+ },
599
+ "uid": "eedccbc17f770675",
600
+ "sources": [
601
+ {
602
+ "type": "table",
603
+ "name": "smsapi_Phone"
604
+ }
605
+ ]
606
+ },
607
+ "commands_new": {
608
+ "code": "(async function(input, output, { tableName }) {\n await input.table(tableName).onChange(async (obj, oldObj) => {\n const res = obj && obj.state == 'new' ? { ...obj, id: obj.service + '_' + obj.id } : null\n const oldRes = oldObj && oldObj.state == 'new' ? { ...oldObj, id: oldObj.service + '_' + oldObj.id } : null\n //output.debug(\"CHANGE \", tableName, \"INDEX\", res, \"OLD:\", oldRes)\n await output.change(res, oldRes)\n })\n })",
609
+ "parameters": {
610
+ "tableName": "commands"
611
+ },
612
+ "uid": "1f75928213090d3e",
613
+ "sources": [
614
+ {
615
+ "type": "table",
616
+ "name": "commands"
617
+ }
618
+ ]
619
+ },
620
+ "triggers_new": {
621
+ "code": "(async function(input, output, { tableName }) {\n await input.table(tableName).onChange(async (obj, oldObj) => {\n const res = obj && obj.state == 'new' ? { ...obj, id: obj.service + '_' + obj.id } : null\n const oldRes = oldObj && oldObj.state == 'new' ? { ...oldObj, id: oldObj.service + '_' + oldObj.id } : null\n //output.debug(\"CHANGE \", tableName, \"INDEX\", res, \"OLD:\", oldRes)\n await output.change(res, oldRes)\n })\n })",
622
+ "parameters": {
623
+ "tableName": "triggers"
624
+ },
625
+ "uid": "fb73ab2f555daa7b",
626
+ "sources": [
627
+ {
628
+ "type": "table",
629
+ "name": "triggers"
630
+ }
631
+ ]
632
+ },
633
+ "security_relations_eventTypeAndKeys": {
634
+ "code": "(async function(input, output, { table }) {\n const mapper = (obj) => ({ id: obj.eventType+'_'+obj.keys+'_'+obj.id, to: obj.id })\n await input.table(table).onChange((obj, oldObj) =>\n output.change(obj && mapper(obj), oldObj && mapper(oldObj)) )\n })",
635
+ "parameters": {
636
+ "table": "security_relations"
637
+ },
638
+ "uid": "7c028c254a570efe",
639
+ "sources": [
640
+ {
641
+ "type": "table",
642
+ "name": "security_relations"
643
+ }
644
+ ]
645
+ },
646
+ "security_relations_sourceRelation": {
647
+ "code": "(async function(input, output, { table }) {\n const mapper = (obj) => ({ id: obj.source+'_'+obj.relation+'_'+obj.id, to: obj.id })\n await input.table(table).onChange((obj, oldObj) =>\n output.change(obj && mapper(obj), oldObj && mapper(oldObj)) )\n })",
648
+ "parameters": {
649
+ "table": "security_relations"
650
+ },
651
+ "uid": "097a16c216e4ecea",
652
+ "sources": [
653
+ {
654
+ "type": "table",
655
+ "name": "security_relations"
656
+ }
657
+ ]
658
+ },
659
+ "session_Session_byKey": {
660
+ "code": "(async function(input, output, { table, properties }) {\n const mapper = (obj) => ({\n id: properties.map(path => {\n let at = obj\n for(const p of path) at = at && at[p]\n return at === undefined ? '' : JSON.stringify(at)\n }).join(':')+'_'+obj.id,\n to: obj.id\n })\n await input.table(table).onChange((obj, oldObj) =>\n output.change(obj && mapper(obj), oldObj && mapper(oldObj)) )\n })",
661
+ "parameters": {
662
+ "properties": [
663
+ [
664
+ "key"
665
+ ]
666
+ ],
667
+ "table": "session_Session"
668
+ },
669
+ "uid": "308761695a3f05d7",
670
+ "sources": [
671
+ {
672
+ "type": "table",
673
+ "name": "session_Session"
674
+ }
675
+ ]
676
+ },
677
+ "passwordAuthentication_ResetPasswordAuthentication_byKey": {
678
+ "code": "(async function(input, output, { table, properties }) {\n const mapper = (obj) => ({\n id: properties.map(path => {\n let at = obj\n for(const p of path) at = at && at[p]\n return at === undefined ? '' : JSON.stringify(at)\n }).join(':')+'_'+obj.id,\n to: obj.id\n })\n await input.table(table).onChange((obj, oldObj) =>\n output.change(obj && mapper(obj), oldObj && mapper(oldObj)) )\n })",
679
+ "parameters": {
680
+ "properties": [
681
+ [
682
+ "key"
683
+ ]
684
+ ],
685
+ "table": "passwordAuthentication_ResetPasswordAuthentication"
686
+ },
687
+ "uid": "c9d8880ce2169308",
688
+ "sources": [
689
+ {
690
+ "type": "table",
691
+ "name": "passwordAuthentication_ResetPasswordAuthentication"
692
+ }
693
+ ]
694
+ },
695
+ "security_Ban_bans": {
696
+ "code": "(async function(input, output, { table, property }) {\n const values = (obj) => {\n let at = obj\n for(const p of property) at = at && at[p]\n if(at === undefined) return []\n if(Array.isArray(at)) return at.map(v => JSON.stringify(v))\n return [at]\n }\n await input.table(table).onChange((obj, oldObj) => {\n if(obj && oldObj) {\n let pointers = obj && new Set(values(obj))\n let oldPointers = oldObj && new Set(values(oldObj))\n for(let pointer of pointers) {\n if(!!oldPointers.has(pointer)) output.change({ id: pointer+'_'+obj.id, to: obj.id }, null)\n }\n for(let pointer of oldPointers) {\n if(!!pointers.has(pointer)) output.change(null, { id: pointer+'_'+obj.id, to: obj.id })\n }\n } else if(obj) {\n values(obj).forEach(v => output.change({ id: v+'_'+obj.id, to: obj.id }, null))\n } else if(oldObj) {\n values(oldObj).forEach(v => output.change(null, { id: v+'_'+oldObj.id, to: oldObj.id }))\n }\n })\n })",
697
+ "parameters": {
698
+ "property": [
699
+ "keys"
700
+ ],
701
+ "table": "security_Ban"
702
+ },
703
+ "uid": "faf9f2ec34435b1e",
704
+ "sources": [
705
+ {
706
+ "type": "table",
707
+ "name": "security_Ban"
708
+ }
709
+ ]
710
+ },
711
+ "security_Ban_actionBans": {
712
+ "code": "(async function(input, output) {\n function prefixes(ban) {\n //output.debug(\"BAN\", ban)\n if(!ban.keys) return []\n if(!ban.actions) return []\n const v = ban.keys.length\n const w = ban.actions.length\n let res = new Array(v * w)\n for(let i = 0; i < v; i++) {\n for(let j = 0; j < w; j++) {\n const key = ban.keys[i]\n res[i * v + j] = `${ban.actions[j]}:${key.key}:${key.value}`\n }\n }\n //output.debug(\"BAN ACTIONS\", res)\n return res\n }\n function indexObject(prefix, obj) {\n //output.debug(\"BAN\", obj)\n return {\n id: prefix+'_'+obj.id,\n to: obj.id,\n type: obj.type,\n expire: obj.expire,\n actions: obj.actions\n }\n }\n await input.table(\"security_Ban\").onChange((obj, oldObj) => {\n if(obj && oldObj) {\n //output.debug(\"CHANGE!\", obj, oldObj)\n const pointers = obj && new Set(prefixes(obj))\n const oldPointers = oldObj && new Set(prefixes(oldObj))\n for(let pointer of pointers) {\n if(!!oldPointers.has(pointer)) output.change(indexObject(pointer, obj), null)\n }\n for(let pointer of oldPointers) {\n if(!!pointers.has(pointer)) output.change(null, indexObject(pointer, oldObj))\n }\n } else if(obj) {\n //output.debug(\"CREATE!\", obj, oldObj)\n prefixes(obj).forEach(v => output.change(indexObject(v, obj), null))\n } else if(oldObj) {\n //output.debug(\"DELETE!\", obj, oldObj)\n prefixes(oldObj).forEach(v => output.change(null, indexObject(v, oldObj)))\n }\n })\n })",
713
+ "parameters": {},
714
+ "uid": "9e0bb5029d6a1648",
715
+ "sources": [
716
+ {
717
+ "type": "table",
718
+ "name": "security_Ban"
719
+ }
720
+ ]
721
+ },
722
+ "security_Ban_actionBansByType": {
723
+ "code": "(async function(input, output) {\n function prefixes(ban) {\n //output.debug(\"BAN\", ban)\n if(!ban.keys) return []\n if(!ban.actions) return []\n const v = ban.keys.length\n const w = ban.actions.length\n let res = new Array(v * w)\n for(let i = 0; i < v; i++) {\n for(let j = 0; j < w; j++) {\n const key = ban.keys[i]\n res[i * v + j] = `${ban.actions[j]}:${key.key}:${key.value}:${ban.type}:${ban.expire}`\n }\n }\n output.debug(\"BAN PREFIXES\", res)\n return res\n }\n function indexObject(prefix, obj) {\n //output.debug(\"BAN\", obj)\n return {\n id: prefix+'_'+obj.id,\n to: obj.id,\n type: obj.type,\n expire: obj.expire,\n actions: obj.actions\n }\n }\n await input.table(\"security_Ban\").onChange((obj, oldObj) => {\n if(obj && oldObj) {\n //output.debug(\"CHANGE!\", obj, oldObj)\n let pointers = obj && new Set(prefixes(obj))\n let oldPointers = oldObj && new Set(prefixes(oldObj))\n for(let pointer of pointers) {\n if(!!oldPointers.has(pointer)) output.change(indexObject(pointer, obj), null)\n }\n for(let pointer of oldPointers) {\n if(!!pointers.has(pointer)) output.change(null, indexObject(pointer, oldObj))\n }\n } else if(obj) {\n //output.debug(\"CREATE!\", obj, oldObj)\n prefixes(obj).forEach(v => output.change(indexObject(v, obj), null))\n } else if(oldObj) {\n //output.debug(\"DELETE!\", obj, oldObj)\n prefixes(oldObj).forEach(v => output.change(null, indexObject(v, oldObj)))\n }\n })\n })",
724
+ "parameters": {},
725
+ "uid": "5708f2e8de4f4184",
726
+ "sources": [
727
+ {
728
+ "type": "table",
729
+ "name": "security_Ban"
730
+ }
731
+ ]
732
+ },
733
+ "security_Event_byKeyTypeAndTimestamp": {
734
+ "code": "(async function(input, output) {\n async function spread(event) {\n for(const key in event.keys) {\n output.put({\n id: `${key}:${JSON.stringify(event.keys[key])}:${event.type}:${event.timestamp}_${event.id}`,\n type: event.type,\n timestamp: event.timestamp\n })\n }\n }\n await input.table('security_Event').onChange(\n (obj, oldObj) => spread(obj)\n )\n })",
735
+ "parameters": {},
736
+ "uid": "e98c224e0b4bb93d",
737
+ "sources": [
738
+ {
739
+ "type": "table",
740
+ "name": "security_Event"
741
+ }
742
+ ]
743
+ },
744
+ "notification_Notification_unreadNotifications": {
745
+ "code": "(async function(input, output) {\n await input.table('notification_Notification')\n .map((obj) => obj && obj.readState == 'new' && ({\n id: `\"${obj.sessionOrUserType}\":\"${obj.sessionOrUser}\"_${obj.id}`,\n sessionOrUserType: obj.sessionOrUserType, sessionOrUser: obj.sessionOrUser,\n to: obj.id\n }))\n .to(output)\n })",
746
+ "parameters": {},
747
+ "uid": "a77ec52da6347b9d",
748
+ "sources": [
749
+ {
750
+ "type": "table",
751
+ "name": "notification_Notification"
752
+ }
753
+ ]
754
+ },
755
+ "notification_Notification_unreadNotificationsCount": {
756
+ "code": "(async function(input, output) {\n const unreadIndex = await input.index('notification_Notification_unreadNotifications')\n await unreadIndex.onChange(\n async (obj, oldObj) => {\n const { sessionOrUserType, sessionOrUser } = obj || oldObj\n const group = `\"${sessionOrUserType}\":\"${sessionOrUser}\"`\n const prefix = group + '_'\n const count = await unreadIndex.count({ gt: prefix, lt: prefix + '\\xFF' })\n output.put({\n id: group,\n count\n })\n }\n )\n })",
757
+ "parameters": {},
758
+ "uid": "09d72f5d2c1c4eb9",
759
+ "sources": [
760
+ {
761
+ "type": "index",
762
+ "name": "notification_Notification_unreadNotifications"
763
+ }
764
+ ]
765
+ },
766
+ "secretCode_Code_byAuthenticationAndSecretCode": {
767
+ "code": "(async function(input, output, { table, properties }) {\n const mapper = (obj) => ({\n id: properties.map(path => {\n let at = obj\n for(const p of path) at = at && at[p]\n return at === undefined ? '' : JSON.stringify(at)\n }).join(':')+'_'+obj.id,\n to: obj.id\n })\n await input.table(table).onChange((obj, oldObj) =>\n output.change(obj && mapper(obj), oldObj && mapper(oldObj)) )\n })",
768
+ "parameters": {
769
+ "properties": [
770
+ [
771
+ "authentication"
772
+ ],
773
+ [
774
+ "secretCode"
775
+ ]
776
+ ],
777
+ "table": "secretCode_Code"
778
+ },
779
+ "uid": "8ccb29f8aacae27d",
780
+ "sources": [
781
+ {
782
+ "type": "table",
783
+ "name": "secretCode_Code"
784
+ }
785
+ ]
786
+ },
787
+ "secretCode_Code_byAuthentication": {
788
+ "code": "(async function(input, output, { table, properties }) {\n const mapper = (obj) => ({\n id: properties.map(path => {\n let at = obj\n for(const p of path) at = at && at[p]\n return at === undefined ? '' : JSON.stringify(at)\n }).join(':')+'_'+obj.id,\n to: obj.id\n })\n await input.table(table).onChange((obj, oldObj) =>\n output.change(obj && mapper(obj), oldObj && mapper(oldObj)) )\n })",
789
+ "parameters": {
790
+ "properties": [
791
+ [
792
+ "authentication"
793
+ ]
794
+ ],
795
+ "table": "secretCode_Code"
796
+ },
797
+ "uid": "2df8ff9c5dea7189",
798
+ "sources": [
799
+ {
800
+ "type": "table",
801
+ "name": "secretCode_Code"
802
+ }
803
+ ]
804
+ },
805
+ "secretLink_Link_bySecretCode": {
806
+ "code": "(async function(input, output, { table, properties }) {\n const mapper = (obj) => ({\n id: properties.map(path => {\n let at = obj\n for(const p of path) at = at && at[p]\n return at === undefined ? '' : JSON.stringify(at)\n }).join(':')+'_'+obj.id,\n to: obj.id\n })\n await input.table(table).onChange((obj, oldObj) =>\n output.change(obj && mapper(obj), oldObj && mapper(oldObj)) )\n })",
807
+ "parameters": {
808
+ "properties": [
809
+ [
810
+ "secretCode"
811
+ ]
812
+ ],
813
+ "table": "secretLink_Link"
814
+ },
815
+ "uid": "ac704ea2a7256ba2",
816
+ "sources": [
817
+ {
818
+ "type": "table",
819
+ "name": "secretLink_Link"
820
+ }
821
+ ]
822
+ },
823
+ "secretLink_Link_byAuthentication": {
824
+ "code": "(async function(input, output, { table, properties }) {\n const mapper = (obj) => ({\n id: properties.map(path => {\n let at = obj\n for(const p of path) at = at && at[p]\n return at === undefined ? '' : JSON.stringify(at)\n }).join(':')+'_'+obj.id,\n to: obj.id\n })\n await input.table(table).onChange((obj, oldObj) =>\n output.change(obj && mapper(obj), oldObj && mapper(oldObj)) )\n })",
825
+ "parameters": {
826
+ "properties": [
827
+ [
828
+ "authentication"
829
+ ]
830
+ ],
831
+ "table": "secretLink_Link"
832
+ },
833
+ "uid": "18737e0a84b5f104",
834
+ "sources": [
835
+ {
836
+ "type": "table",
837
+ "name": "secretLink_Link"
838
+ }
839
+ ]
840
+ },
841
+ "url_Canonical_byUrl": {
842
+ "code": "(async function(input, output, { table, properties }) {\n const mapper = (obj) => ({\n id: properties.map(path => {\n let at = obj\n for(const p of path) at = at && at[p]\n return at === undefined ? '' : JSON.stringify(at)\n }).join(':')+'_'+obj.id,\n to: obj.id\n })\n await input.table(table).onChange((obj, oldObj) =>\n output.change(obj && mapper(obj), oldObj && mapper(oldObj)) )\n })",
843
+ "parameters": {
844
+ "properties": [
845
+ [
846
+ "targetType"
847
+ ],
848
+ [
849
+ "domain"
850
+ ],
851
+ [
852
+ "path"
853
+ ]
854
+ ],
855
+ "table": "url_Canonical"
856
+ },
857
+ "uid": "62ee6ea3c413ea95",
858
+ "sources": [
859
+ {
860
+ "type": "table",
861
+ "name": "url_Canonical"
862
+ }
863
+ ]
864
+ },
865
+ "url_Redirect_byUrl": {
866
+ "code": "(async function(input, output, { table, properties }) {\n const mapper = (obj) => ({\n id: properties.map(path => {\n let at = obj\n for(const p of path) at = at && at[p]\n return at === undefined ? '' : JSON.stringify(at)\n }).join(':')+'_'+obj.id,\n to: obj.id\n })\n await input.table(table).onChange((obj, oldObj) =>\n output.change(obj && mapper(obj), oldObj && mapper(oldObj)) )\n })",
867
+ "parameters": {
868
+ "properties": [
869
+ [
870
+ "targetType"
871
+ ],
872
+ [
873
+ "domain"
874
+ ],
875
+ [
876
+ "path"
877
+ ]
878
+ ],
879
+ "table": "url_Redirect"
880
+ },
881
+ "uid": "3e33668b96e83981",
882
+ "sources": [
883
+ {
884
+ "type": "table",
885
+ "name": "url_Redirect"
886
+ }
887
+ ]
888
+ },
889
+ "prosemirror_Snapshot_list": {
890
+ "code": "(async function(input, output, { table, properties }) {\n const mapper = (obj) => ({\n id: properties.map(path => {\n let at = obj\n for(const p of path) at = at && at[p]\n return at === undefined ? '' : JSON.stringify(at)\n }).join(':')+'_'+obj.id,\n to: obj.id\n })\n await input.table(table).onChange((obj, oldObj) =>\n output.change(obj && mapper(obj), oldObj && mapper(oldObj)) )\n })",
891
+ "parameters": {
892
+ "properties": [
893
+ [
894
+ "document"
895
+ ],
896
+ [
897
+ "version"
898
+ ]
899
+ ],
900
+ "table": "prosemirror_Snapshot"
901
+ },
902
+ "uid": "b62939a263ad4bef",
903
+ "sources": [
904
+ {
905
+ "type": "table",
906
+ "name": "prosemirror_Snapshot"
907
+ }
908
+ ]
909
+ },
910
+ "googleAuthentication_Login_byUser": {
911
+ "code": "(async function(input, output, { table, properties }) {\n const mapper = (obj) => ({\n id: properties.map(path => {\n let at = obj\n for(const p of path) at = at && at[p]\n return at === undefined ? '' : JSON.stringify(at)\n }).join(':')+'_'+obj.id,\n to: obj.id\n })\n await input.table(table).onChange((obj, oldObj) =>\n output.change(obj && mapper(obj), oldObj && mapper(oldObj)) )\n })",
912
+ "parameters": {
913
+ "properties": [
914
+ [
915
+ "user"
916
+ ]
917
+ ],
918
+ "table": "googleAuthentication_Login"
919
+ },
920
+ "uid": "6693e3ec7a701f05",
921
+ "sources": [
922
+ {
923
+ "type": "table",
924
+ "name": "googleAuthentication_Login"
925
+ }
926
+ ]
927
+ },
928
+ "adsApi_ApiAccess_byUser": {
929
+ "code": "(async function(input, output, { table, properties }) {\n const mapper = (obj) => ({\n id: properties.map(path => {\n let at = obj\n for(const p of path) at = at && at[p]\n return at === undefined ? '' : JSON.stringify(at)\n }).join(':')+'_'+obj.id,\n to: obj.id\n })\n await input.table(table).onChange((obj, oldObj) =>\n output.change(obj && mapper(obj), oldObj && mapper(oldObj)) )\n })",
930
+ "parameters": {
931
+ "properties": [
932
+ [
933
+ "user"
934
+ ]
935
+ ],
936
+ "table": "adsApi_ApiAccess"
937
+ },
938
+ "uid": "1696caf7ea2a4d0f",
939
+ "sources": [
940
+ {
941
+ "type": "table",
942
+ "name": "adsApi_ApiAccess"
943
+ }
944
+ ]
945
+ },
946
+ "adsApi_UserOwnedAccount_byUser": {
947
+ "code": "(async function(input, output, { table, properties }) {\n const mapper = (obj) => ({\n id: properties.map(path => {\n let at = obj\n for(const p of path) at = at && at[p]\n return at === undefined ? '' : JSON.stringify(at)\n }).join(':')+'_'+obj.id,\n to: obj.id\n })\n await input.table(table).onChange((obj, oldObj) =>\n output.change(obj && mapper(obj), oldObj && mapper(oldObj)) )\n })",
948
+ "parameters": {
949
+ "properties": [
950
+ [
951
+ "user"
952
+ ]
953
+ ],
954
+ "table": "adsApi_UserOwnedAccount"
955
+ },
956
+ "uid": "55d76aba32b77373",
957
+ "sources": [
958
+ {
959
+ "type": "table",
960
+ "name": "adsApi_UserOwnedAccount"
961
+ }
962
+ ]
963
+ },
964
+ "adsApi_UserOwnedAccount_byAccount": {
965
+ "code": "(async function(input, output, { table, properties }) {\n const mapper = (obj) => ({\n id: properties.map(path => {\n let at = obj\n for(const p of path) at = at && at[p]\n return at === undefined ? '' : JSON.stringify(at)\n }).join(':')+'_'+obj.id,\n to: obj.id\n })\n await input.table(table).onChange((obj, oldObj) =>\n output.change(obj && mapper(obj), oldObj && mapper(oldObj)) )\n })",
966
+ "parameters": {
967
+ "properties": [
968
+ [
969
+ "account"
970
+ ]
971
+ ],
972
+ "table": "adsApi_UserOwnedAccount"
973
+ },
974
+ "uid": "c3c6f959a604751e",
975
+ "sources": [
976
+ {
977
+ "type": "table",
978
+ "name": "adsApi_UserOwnedAccount"
979
+ }
980
+ ]
981
+ },
982
+ "adsApi_Campaign_byAccount": {
983
+ "code": "(async function(input, output, { table, properties }) {\n const mapper = (obj) => ({\n id: properties.map(path => {\n let at = obj\n for(const p of path) at = at && at[p]\n return at === undefined ? '' : JSON.stringify(at)\n }).join(':')+'_'+obj.id,\n to: obj.id\n })\n await input.table(table).onChange((obj, oldObj) =>\n output.change(obj && mapper(obj), oldObj && mapper(oldObj)) )\n })",
984
+ "parameters": {
985
+ "properties": [
986
+ [
987
+ "account"
988
+ ]
989
+ ],
990
+ "table": "adsApi_Campaign"
991
+ },
992
+ "uid": "d8f27b200f78bb17",
993
+ "sources": [
994
+ {
995
+ "type": "table",
996
+ "name": "adsApi_Campaign"
997
+ }
998
+ ]
999
+ },
1000
+ "urlChecker_Checker_byUser": {
1001
+ "code": "(async function(input, output, { table, properties }) {\n const mapper = (obj) => ({\n id: properties.map(path => {\n let at = obj\n for(const p of path) at = at && at[p]\n return at === undefined ? '' : JSON.stringify(at)\n }).join(':')+'_'+obj.id,\n to: obj.id\n })\n await input.table(table).onChange((obj, oldObj) =>\n output.change(obj && mapper(obj), oldObj && mapper(oldObj)) )\n })",
1002
+ "parameters": {
1003
+ "properties": [
1004
+ [
1005
+ "user"
1006
+ ],
1007
+ [
1008
+ "timestamp"
1009
+ ]
1010
+ ],
1011
+ "table": "urlChecker_Checker"
1012
+ },
1013
+ "uid": "29c2c7888643b841",
1014
+ "sources": [
1015
+ {
1016
+ "type": "table",
1017
+ "name": "urlChecker_Checker"
1018
+ }
1019
+ ]
1020
+ },
1021
+ "urlChecker_Checker_byUserUrlHash": {
1022
+ "code": "(async function(input, output) {\n input.table('urlChecker_Checker').filter(obj => obj.url).indexBy(obj => [\n obj.user,\n hash(obj.url)\n ]).to(output)\n })",
1023
+ "parameters": {},
1024
+ "uid": "17372b392e30b28b",
1025
+ "sources": [
1026
+ {
1027
+ "type": "table",
1028
+ "name": "urlChecker_Checker"
1029
+ }
1030
+ ]
1031
+ },
1032
+ "urlChecker_Check_byUrlHashTs": {
1033
+ "code": "(async function(input, output) {\n const mapper =\n (obj) => ({\n id: `\"${crypto.createHash('sha1').update(obj.url).digest('hex')}\":\"${obj.timestamp}\"_${obj.id}`,\n to: obj.id\n })\n await input.table('urlChecker_Check').onChange(\n (obj, oldObj) => output.change(obj && mapper(obj), oldObj && mapper(oldObj))\n )\n })",
1034
+ "parameters": {},
1035
+ "uid": "d22ae12530c7961d",
1036
+ "sources": [
1037
+ {
1038
+ "type": "table",
1039
+ "name": "urlChecker_Check"
1040
+ }
1041
+ ]
1042
+ },
1043
+ "urlChecker_Check_byTs": {
1044
+ "code": "(async function(input, output, { table, properties }) {\n const mapper = (obj) => ({\n id: properties.map(path => {\n let at = obj\n for(const p of path) at = at && at[p]\n return at === undefined ? '' : JSON.stringify(at)\n }).join(':')+'_'+obj.id,\n to: obj.id\n })\n await input.table(table).onChange((obj, oldObj) =>\n output.change(obj && mapper(obj), oldObj && mapper(oldObj)) )\n })",
1045
+ "parameters": {
1046
+ "properties": [
1047
+ [
1048
+ "timestamp"
1049
+ ]
1050
+ ],
1051
+ "table": "urlChecker_Check"
1052
+ },
1053
+ "uid": "9575af16100e0581",
1054
+ "sources": [
1055
+ {
1056
+ "type": "table",
1057
+ "name": "urlChecker_Check"
1058
+ }
1059
+ ]
1060
+ },
1061
+ "xmlAlert_Scanner_byUser": {
1062
+ "code": "(async function(input, output, { table, properties }) {\n const mapper = (obj) => ({\n id: properties.map(path => {\n let at = obj\n for(const p of path) at = at && at[p]\n return at === undefined ? '' : JSON.stringify(at)\n }).join(':')+'_'+obj.id,\n to: obj.id\n })\n await input.table(table).onChange((obj, oldObj) =>\n output.change(obj && mapper(obj), oldObj && mapper(oldObj)) )\n })",
1063
+ "parameters": {
1064
+ "properties": [
1065
+ [
1066
+ "user"
1067
+ ],
1068
+ [
1069
+ "timestamp"
1070
+ ]
1071
+ ],
1072
+ "table": "xmlAlert_Scanner"
1073
+ },
1074
+ "uid": "1d02fa225368d73d",
1075
+ "sources": [
1076
+ {
1077
+ "type": "table",
1078
+ "name": "xmlAlert_Scanner"
1079
+ }
1080
+ ]
1081
+ },
1082
+ "xmlAlert_Scanner_byUserUrlHash": {
1083
+ "code": "(async function(input, output) {\n const mapper =\n (obj) => (obj && obj.url) ? ({\n id: `\"${obj.user}\":\"${crypto.createHash('sha1').update(obj.url).digest('hex')}\"_${obj.id}`,\n to: obj.id\n }) : null\n await input.table('xmlAlert_Scanner').onChange(\n (obj, oldObj) => output.change(obj && mapper(obj), oldObj && mapper(oldObj))\n )\n })",
1084
+ "parameters": {},
1085
+ "uid": "2cb9c8a968832052",
1086
+ "sources": [
1087
+ {
1088
+ "type": "table",
1089
+ "name": "xmlAlert_Scanner"
1090
+ }
1091
+ ]
1092
+ },
1093
+ "xmlAlert_Scan_byScannerTs": {
1094
+ "code": "(async function(input, output, { table, properties }) {\n const mapper = (obj) => ({\n id: properties.map(path => {\n let at = obj\n for(const p of path) at = at && at[p]\n return at === undefined ? '' : JSON.stringify(at)\n }).join(':')+'_'+obj.id,\n to: obj.id\n })\n await input.table(table).onChange((obj, oldObj) =>\n output.change(obj && mapper(obj), oldObj && mapper(oldObj)) )\n })",
1095
+ "parameters": {
1096
+ "properties": [
1097
+ [
1098
+ "scanner"
1099
+ ],
1100
+ [
1101
+ "timestamp"
1102
+ ]
1103
+ ],
1104
+ "table": "xmlAlert_Scan"
1105
+ },
1106
+ "uid": "6dd64a2452a0d4f6",
1107
+ "sources": [
1108
+ {
1109
+ "type": "table",
1110
+ "name": "xmlAlert_Scan"
1111
+ }
1112
+ ]
1113
+ },
1114
+ "xmlAlert_Scan_notDeletedByScannerTs": {
1115
+ "code": "(async function(input, output) {\n const tryChange = (obj, oldObj) => (obj || oldObj) && output.change(obj, oldObj)\n const mapper =\n (obj) => obj.state != 'deleted' &&\n ({ id: `${JSON.stringify(obj.scanner)}:${JSON.stringify(obj.finishedTimestamp)}_${obj.id}`, to: obj.id })\n await input.table('xmlAlert_Scan').onChange(\n (obj, oldObj) => tryChange(obj && mapper(obj), oldObj && mapper(oldObj))\n )\n })",
1116
+ "parameters": {},
1117
+ "uid": "c3552f9330d9911b",
1118
+ "sources": [
1119
+ {
1120
+ "type": "table",
1121
+ "name": "xmlAlert_Scan"
1122
+ }
1123
+ ]
1124
+ },
1125
+ "xmlAlert_Scan_byScanner": {
1126
+ "code": "(async function(input, output, { table, properties }) {\n const mapper = (obj) => ({\n id: properties.map(path => {\n let at = obj\n for(const p of path) at = at && at[p]\n return at === undefined ? '' : JSON.stringify(at)\n }).join(':')+'_'+obj.id,\n to: obj.id\n })\n await input.table(table).onChange((obj, oldObj) =>\n output.change(obj && mapper(obj), oldObj && mapper(oldObj)) )\n })",
1127
+ "parameters": {
1128
+ "properties": [
1129
+ [
1130
+ "scanner"
1131
+ ]
1132
+ ],
1133
+ "table": "xmlAlert_Scan"
1134
+ },
1135
+ "uid": "f98f3c775cd59dee",
1136
+ "sources": [
1137
+ {
1138
+ "type": "table",
1139
+ "name": "xmlAlert_Scan"
1140
+ }
1141
+ ]
1142
+ },
1143
+ "xmlAlert_Scan_notDone": {
1144
+ "code": "(async function(input, output) {\n const tryChange = (obj, oldObj) => (obj || oldObj) && output.change(obj, oldObj)\n const mapper =\n (obj) => obj.state != 'done' && obj.state != 'deleted' &&\n ({ id: `${JSON.stringify(obj.timestamp)}_${obj.id}`, to: obj.id })\n await input.table('xmlAlert_Scan').onChange(\n (obj, oldObj) => tryChange(obj && mapper(obj), oldObj && mapper(oldObj))\n )\n })",
1145
+ "parameters": {},
1146
+ "uid": "a76808df4fda9910",
1147
+ "sources": [
1148
+ {
1149
+ "type": "table",
1150
+ "name": "xmlAlert_Scan"
1151
+ }
1152
+ ]
1153
+ },
1154
+ "xmlAlert_Scan_doneByTimestamp": {
1155
+ "code": "(async function(input, output) {\n const tryChange = (obj, oldObj) => (obj || oldObj) && output.change(obj, oldObj)\n const mapper =\n (obj) => obj.state == 'done' && obj.state != 'deleted' &&\n ({ id: `${JSON.stringify(obj.finishedTimestamp)}_${obj.id}`, to: obj.id })\n await input.table('xmlAlert_Scan').onChange(\n (obj, oldObj) => tryChange(obj && mapper(obj), oldObj && mapper(oldObj))\n )\n })",
1156
+ "parameters": {},
1157
+ "uid": "2eee56a3efe9faa7",
1158
+ "sources": [
1159
+ {
1160
+ "type": "table",
1161
+ "name": "xmlAlert_Scan"
1162
+ }
1163
+ ]
1164
+ },
1165
+ "xmlAlert_Scan_notDeletedByTimestamp": {
1166
+ "code": "(async function(input, output) {\n const tryChange = (obj, oldObj) => (obj || oldObj) && output.change(obj, oldObj)\n const mapper =\n (obj) => obj.state != 'deleted' &&\n ({ id: `${JSON.stringify(obj.finishedTimestamp)}_${obj.id}`, to: obj.id })\n await input.table('xmlAlert_Scan').onChange(\n (obj, oldObj) => tryChange(obj && mapper(obj), oldObj && mapper(oldObj))\n )\n })",
1167
+ "parameters": {},
1168
+ "uid": "1c80323257e65f26",
1169
+ "sources": [
1170
+ {
1171
+ "type": "table",
1172
+ "name": "xmlAlert_Scan"
1173
+ }
1174
+ ]
1175
+ },
1176
+ "xmlAlert_Result_byScan": {
1177
+ "code": "(async function(input, output, { table, properties }) {\n const mapper = (obj) => ({\n id: properties.map(path => {\n let at = obj\n for(const p of path) at = at && at[p]\n return at === undefined ? '' : JSON.stringify(at)\n }).join(':')+'_'+obj.id,\n to: obj.id\n })\n await input.table(table).onChange((obj, oldObj) =>\n output.change(obj && mapper(obj), oldObj && mapper(oldObj)) )\n })",
1178
+ "parameters": {
1179
+ "properties": [
1180
+ [
1181
+ "scan"
1182
+ ]
1183
+ ],
1184
+ "table": "xmlAlert_Result"
1185
+ },
1186
+ "uid": "cb4ae97552c00ccb",
1187
+ "sources": [
1188
+ {
1189
+ "type": "table",
1190
+ "name": "xmlAlert_Result"
1191
+ }
1192
+ ]
1193
+ },
1194
+ "xmlAlert_Result_byItemSeverity": {
1195
+ "code": "(async function(input, output) {\n function mapper(obj) {\n if(!obj) return obj\n const severity = `${['fatal', 'error', 'warning', 'notice'].indexOf(obj.severity)}.${obj.severity}`\n const s = v => JSON.stringify(v)\n return {\n id: `${s(obj.scan)}:${obj.id.split('_')[2]}:${s(severity)}_${obj.id}`,\n to: obj.id\n }\n }\n await input.table('xmlAlert_Result').onChange(\n (obj, oldObj) => output.change(mapper(obj), mapper(oldObj))\n )\n })",
1196
+ "parameters": {},
1197
+ "uid": "58cc3a0393e58722",
1198
+ "sources": [
1199
+ {
1200
+ "type": "table",
1201
+ "name": "xmlAlert_Result"
1202
+ }
1203
+ ]
1204
+ },
1205
+ "xmlAlert_Result_bySeverityStageItemField": {
1206
+ "code": "(async function(input, output) {\n function mapper(obj) {\n if(!obj) return obj\n const severity = `${['fatal', 'error', 'warning', 'notice'].indexOf(obj.severity)}.${obj.severity}`\n const s = v => JSON.stringify(v)\n return {\n id: `${s(obj.scan)}:${s(severity)}_${obj.id}`,\n to: obj.id\n }\n }\n await input.table('xmlAlert_Result').onChange(\n (obj, oldObj) => output.change(mapper(obj), mapper(oldObj))\n )\n })",
1207
+ "parameters": {},
1208
+ "uid": "fc290c08221e5925",
1209
+ "sources": [
1210
+ {
1211
+ "type": "table",
1212
+ "name": "xmlAlert_Result"
1213
+ }
1214
+ ]
1215
+ },
1216
+ "xmlAlert_Result_bySeverityCount": {
1217
+ "code": "(async function(input, output) {\n await input.table('xmlAlert_Result').onChange(\n (obj, oldObj, id, ts) => {\n const oldSeverity = oldObj && oldObj.severity\n const severity = obj && obj.severity\n if(severity != oldSeverity) {\n if(oldSeverity) output.update(`${oldObj.scan}_${oldSeverity}`, [\n { op: \"conditional\",\n conditions: [\n { test: 'lt', property: 'lastUpdate', value: ts }\n ],\n operations: [\n { op: 'add', property: 'count', value: -1 }\n ]\n }\n ])\n if(severity) output.update(`${obj.scan}_${severity}`, [\n { op: \"conditional\",\n conditions: [\n { test: 'notExist', property: 'count' }\n ],\n operations: [\n { op: 'set', property: 'count', value: 1 },\n { op: 'set', property: 'lastUpdate', value: ts }\n ]\n },\n { op: \"conditional\",\n conditions: [\n { test: 'lt', property: 'lastUpdate', value: ts }\n ],\n operations: [\n { op: 'add', property: 'count', value: 1 }\n ]\n },\n { op: 'merge', value: { severity: obj.severity, scan: obj.scan, lastUpdate: ts } },\n ])\n }\n }\n )\n })",
1218
+ "parameters": {},
1219
+ "uid": "93d919446cee3173",
1220
+ "sources": [
1221
+ {
1222
+ "type": "table",
1223
+ "name": "xmlAlert_Result"
1224
+ }
1225
+ ]
1226
+ },
1227
+ "xmlSearch_DataSet_byUrlHashTimestamp": {
1228
+ "code": "(async function(input, output) {\n const mapper =\n (obj) => obj.url && ({\n id: `\"${crypto.createHash('sha1').update(obj.url).digest('hex')}\"`+\n `:\"${obj.timestamp}\"_${obj.id}`,\n to: obj.id\n })\n await input.table('xmlSearch_DataSet').onChange(\n (obj, oldObj) => output.change(obj && mapper(obj), oldObj && mapper(oldObj))\n )\n })",
1229
+ "parameters": {},
1230
+ "uid": "41f2c5fbb8b38e5b",
1231
+ "sources": [
1232
+ {
1233
+ "type": "table",
1234
+ "name": "xmlSearch_DataSet"
1235
+ }
1236
+ ]
1237
+ },
1238
+ "xmlSearch_DataSet_notDeletedByTimestamp": {
1239
+ "code": "(async function(input, output) {\n const mapper =\n (obj) => obj.state != 'deleted' && ({\n id: `\"${obj.timestamp}\"_${obj.id}`,\n to: obj.id\n })\n await input.table('xmlSearch_DataSet').onChange(\n (obj, oldObj) => output.change(obj && mapper(obj), oldObj && mapper(oldObj))\n )\n })",
1240
+ "parameters": {},
1241
+ "uid": "21da5a1de61b1a32",
1242
+ "sources": [
1243
+ {
1244
+ "type": "table",
1245
+ "name": "xmlSearch_DataSet"
1246
+ }
1247
+ ]
1248
+ },
1249
+ "xmlSearch_DataSet_notDeletedByUrlHashTimestamp": {
1250
+ "code": "(async function(input, output) {\n const mapper =\n (obj) => obj.state != 'deleted' && obj.url && ({\n id: `\"${crypto.createHash('sha1').update(obj.url).digest('hex')}\"`+\n `:\"${obj.timestamp}\"_${obj.id}`,\n to: obj.id })\n await input.table('xmlSearch_DataSet').onChange(\n (obj, oldObj) => output.change(obj && mapper(obj), oldObj && mapper(oldObj))\n )\n })",
1251
+ "parameters": {},
1252
+ "uid": "2e6bdacc2cb32bb4",
1253
+ "sources": [
1254
+ {
1255
+ "type": "table",
1256
+ "name": "xmlSearch_DataSet"
1257
+ }
1258
+ ]
1259
+ },
1260
+ "xmlSearch_DataSet_bySnapshot": {
1261
+ "code": "(async function(input, output, { table, properties }) {\n const mapper = (obj) => ({\n id: properties.map(path => {\n let at = obj\n for(const p of path) at = at && at[p]\n return at === undefined ? '' : JSON.stringify(at)\n }).join(':')+'_'+obj.id,\n to: obj.id\n })\n await input.table(table).onChange((obj, oldObj) =>\n output.change(obj && mapper(obj), oldObj && mapper(oldObj)) )\n })",
1262
+ "parameters": {
1263
+ "properties": [
1264
+ [
1265
+ "snapshot"
1266
+ ]
1267
+ ],
1268
+ "table": "xmlSearch_DataSet"
1269
+ },
1270
+ "uid": "6ff99829d8ead494",
1271
+ "sources": [
1272
+ {
1273
+ "type": "table",
1274
+ "name": "xmlSearch_DataSet"
1275
+ }
1276
+ ]
1277
+ },
1278
+ "xmlSearch_Search_bySessionDataSetQueryHash": {
1279
+ "code": "(async function(input, output) {\n const mapper =\n (obj) => obj.state != 'deleted' && ({\n id: `\"${obj.session}\":\"${obj.dataSet}\"`+\n `:\"${crypto.createHash('sha1').update(JSON.stringify(obj.query) || '').digest('hex')}\"`+\n `_${obj.id}`,\n to: obj.id\n })\n await input.table('xmlSearch_Search').onChange(\n (obj, oldObj) => output.change(obj && mapper(obj), oldObj && mapper(oldObj))\n )\n })",
1280
+ "parameters": {},
1281
+ "uid": "f98c2735fc37fff1",
1282
+ "sources": [
1283
+ {
1284
+ "type": "table",
1285
+ "name": "xmlSearch_Search"
1286
+ }
1287
+ ]
1288
+ },
1289
+ "xmlSearch_Search_byUserDataSetQueryHash": {
1290
+ "code": "(async function(input, output) {\n const mapper =\n (obj) => obj.state != 'deleted' && ({\n id: `\"${obj.user}\":\"${obj.dataSet}\"`+\n `:\"${crypto.createHash('sha1').update(JSON.stringify(obj.query) || '').digest('hex')}\"`+\n `_${obj.id}`,\n to: obj.id\n })\n await input.table('xmlSearch_Search').onChange(\n (obj, oldObj) => output.change(obj && mapper(obj), oldObj && mapper(oldObj))\n )\n })",
1291
+ "parameters": {},
1292
+ "uid": "1c93e81f116dbb3c",
1293
+ "sources": [
1294
+ {
1295
+ "type": "table",
1296
+ "name": "xmlSearch_Search"
1297
+ }
1298
+ ]
1299
+ },
1300
+ "xmlSearch_Search_bySession": {
1301
+ "code": "(async function(input, output, { table, properties }) {\n const mapper = (obj) => ({\n id: properties.map(path => {\n let at = obj\n for(const p of path) at = at && at[p]\n return at === undefined ? '' : JSON.stringify(at)\n }).join(':')+'_'+obj.id,\n to: obj.id\n })\n await input.table(table).onChange((obj, oldObj) =>\n output.change(obj && mapper(obj), oldObj && mapper(oldObj)) )\n })",
1302
+ "parameters": {
1303
+ "properties": [
1304
+ [
1305
+ "session"
1306
+ ],
1307
+ [
1308
+ "timestamp"
1309
+ ]
1310
+ ],
1311
+ "table": "xmlSearch_Search"
1312
+ },
1313
+ "uid": "9017f05a1dd171c0",
1314
+ "sources": [
1315
+ {
1316
+ "type": "table",
1317
+ "name": "xmlSearch_Search"
1318
+ }
1319
+ ]
1320
+ },
1321
+ "xmlSearch_Search_byUser": {
1322
+ "code": "(async function(input, output, { table, properties }) {\n const mapper = (obj) => ({\n id: properties.map(path => {\n let at = obj\n for(const p of path) at = at && at[p]\n return at === undefined ? '' : JSON.stringify(at)\n }).join(':')+'_'+obj.id,\n to: obj.id\n })\n await input.table(table).onChange((obj, oldObj) =>\n output.change(obj && mapper(obj), oldObj && mapper(oldObj)) )\n })",
1323
+ "parameters": {
1324
+ "properties": [
1325
+ [
1326
+ "user"
1327
+ ],
1328
+ [
1329
+ "timestamp"
1330
+ ]
1331
+ ],
1332
+ "table": "xmlSearch_Search"
1333
+ },
1334
+ "uid": "ddb106a573a4352c",
1335
+ "sources": [
1336
+ {
1337
+ "type": "table",
1338
+ "name": "xmlSearch_Search"
1339
+ }
1340
+ ]
1341
+ },
1342
+ "xmlSearch_Search_bySessionUrlHash": {
1343
+ "code": "(async function(input, output) {\n const mapper =\n (obj) => obj.url && ({\n id: `\"${obj.session}\"`+\n `:\"${crypto.createHash('sha1').update(obj.url || '').digest('hex')}\"`+\n `:\"${obj.timestamp}\"_${obj.id}`,\n to: obj.id\n })\n await input.table('xmlSearch_Search').onChange(\n (obj, oldObj) => output.change(obj && mapper(obj), oldObj && mapper(oldObj))\n )\n })",
1344
+ "parameters": {},
1345
+ "uid": "f40b98e9df138bb0",
1346
+ "sources": [
1347
+ {
1348
+ "type": "table",
1349
+ "name": "xmlSearch_Search"
1350
+ }
1351
+ ]
1352
+ },
1353
+ "xmlSearch_Search_byUserUrlHash": {
1354
+ "code": "(async function(input, output) {\n const mapper =\n (obj) => obj.url && ({\n id: `\"${obj.user}\"`+\n `:\"${crypto.createHash('sha1').update(obj.url || '').digest('hex')}\"`+\n `:\"${obj.timestamp}\"_${obj.id}`,\n to: obj.id\n })\n await input.table('xmlSearch_Search').onChange(\n (obj, oldObj) => output.change(obj && mapper(obj), oldObj && mapper(oldObj))\n )\n })",
1355
+ "parameters": {},
1356
+ "uid": "19d74942f30f4306",
1357
+ "sources": [
1358
+ {
1359
+ "type": "table",
1360
+ "name": "xmlSearch_Search"
1361
+ }
1362
+ ]
1363
+ },
1364
+ "xmlSearch_Search_bySessionDataSet": {
1365
+ "code": "(async function(input, output, { table, properties }) {\n const mapper = (obj) => ({\n id: properties.map(path => {\n let at = obj\n for(const p of path) at = at && at[p]\n return at === undefined ? '' : JSON.stringify(at)\n }).join(':')+'_'+obj.id,\n to: obj.id\n })\n await input.table(table).onChange((obj, oldObj) =>\n output.change(obj && mapper(obj), oldObj && mapper(oldObj)) )\n })",
1366
+ "parameters": {
1367
+ "properties": [
1368
+ [
1369
+ "session"
1370
+ ],
1371
+ [
1372
+ "dataSet"
1373
+ ],
1374
+ [
1375
+ "timestamp"
1376
+ ]
1377
+ ],
1378
+ "table": "xmlSearch_Search"
1379
+ },
1380
+ "uid": "c84fda8a9b6ea6db",
1381
+ "sources": [
1382
+ {
1383
+ "type": "table",
1384
+ "name": "xmlSearch_Search"
1385
+ }
1386
+ ]
1387
+ },
1388
+ "xmlSearch_Search_byUserDataSet": {
1389
+ "code": "(async function(input, output, { table, properties }) {\n const mapper = (obj) => ({\n id: properties.map(path => {\n let at = obj\n for(const p of path) at = at && at[p]\n return at === undefined ? '' : JSON.stringify(at)\n }).join(':')+'_'+obj.id,\n to: obj.id\n })\n await input.table(table).onChange((obj, oldObj) =>\n output.change(obj && mapper(obj), oldObj && mapper(oldObj)) )\n })",
1390
+ "parameters": {
1391
+ "properties": [
1392
+ [
1393
+ "user"
1394
+ ],
1395
+ [
1396
+ "dataSet"
1397
+ ],
1398
+ [
1399
+ "timestamp"
1400
+ ]
1401
+ ],
1402
+ "table": "xmlSearch_Search"
1403
+ },
1404
+ "uid": "b40575524cfb8108",
1405
+ "sources": [
1406
+ {
1407
+ "type": "table",
1408
+ "name": "xmlSearch_Search"
1409
+ }
1410
+ ]
1411
+ },
1412
+ "xmlSearch_Search_bySessionQueryHash": {
1413
+ "code": "(async function(input, output) {\n const mapper =\n (obj) => obj.state != 'deleted' && ({\n id: `\"${obj.session}\"`+\n `:\"${crypto.createHash('sha1').update(JSON.stringify(obj.query) || '').digest('hex')}\"`+\n `:\"${obj.timestamp}\"_${obj.id}`,\n to: obj.id\n })\n await input.table('xmlSearch_Search').onChange(\n (obj, oldObj) => output.change(obj && mapper(obj), oldObj && mapper(oldObj))\n )\n })",
1414
+ "parameters": {},
1415
+ "uid": "21791574a9b46e4e",
1416
+ "sources": [
1417
+ {
1418
+ "type": "table",
1419
+ "name": "xmlSearch_Search"
1420
+ }
1421
+ ]
1422
+ },
1423
+ "xmlSearch_Search_byUserQueryHash": {
1424
+ "code": "(async function(input, output) {\n const mapper =\n (obj) => obj.state != 'deleted' && ({\n id: `\"${obj.user}\"`+\n `:\"${crypto.createHash('sha1').update(JSON.stringify(obj.query) || '').digest('hex')}\"`+\n `:\"${obj.timestamp}\"_${obj.id}`,\n to: obj.id\n })\n await input.table('xmlSearch_Search').onChange(\n (obj, oldObj) => output.change(obj && mapper(obj), oldObj && mapper(oldObj))\n )\n })",
1425
+ "parameters": {},
1426
+ "uid": "67c349d581b53a41",
1427
+ "sources": [
1428
+ {
1429
+ "type": "table",
1430
+ "name": "xmlSearch_Search"
1431
+ }
1432
+ ]
1433
+ },
1434
+ "xmlSearch_Search_byDataSet": {
1435
+ "code": "(async function(input, output, { table, properties }) {\n const mapper = (obj) => ({\n id: properties.map(path => {\n let at = obj\n for(const p of path) at = at && at[p]\n return at === undefined ? '' : JSON.stringify(at)\n }).join(':')+'_'+obj.id,\n to: obj.id\n })\n await input.table(table).onChange((obj, oldObj) =>\n output.change(obj && mapper(obj), oldObj && mapper(oldObj)) )\n })",
1436
+ "parameters": {
1437
+ "properties": [
1438
+ [
1439
+ "dataSet"
1440
+ ]
1441
+ ],
1442
+ "table": "xmlSearch_Search"
1443
+ },
1444
+ "uid": "b97ca10677a887c6",
1445
+ "sources": [
1446
+ {
1447
+ "type": "table",
1448
+ "name": "xmlSearch_Search"
1449
+ }
1450
+ ]
1451
+ },
1452
+ "xmlSearch_Search_notDeletedByTimestamp": {
1453
+ "code": "(async function(input, output) {\n const mapper =\n (obj) => obj.state != 'deleted' &&\n ({ id: `${JSON.stringify(obj.timestamp)}_${obj.id}`, to: obj.id })\n await input.table('xmlSearch_Search').onChange(\n (obj, oldObj) => output.change(obj && mapper(obj), oldObj && mapper(oldObj))\n )\n })",
1454
+ "parameters": {},
1455
+ "uid": "58f7275fca0e3102",
1456
+ "sources": [
1457
+ {
1458
+ "type": "table",
1459
+ "name": "xmlSearch_Search"
1460
+ }
1461
+ ]
1462
+ },
1463
+ "xmlSearch_Search_byUrlHashTimestamp": {
1464
+ "code": "(async function(input, output) {\n const mapper =\n (obj) => obj.url && ({\n id: `\"${crypto.createHash('sha1').update(obj.url || '').digest('hex')}\"`+\n `:\"${obj.timestamp}\"_${obj.id}`,\n to: obj.id\n })\n await input.table('xmlSearch_Search').onChange(\n (obj, oldObj) => output.change(obj && mapper(obj), oldObj && mapper(oldObj))\n )\n })",
1465
+ "parameters": {},
1466
+ "uid": "4be8c3ef2992978d",
1467
+ "sources": [
1468
+ {
1469
+ "type": "table",
1470
+ "name": "xmlSearch_Search"
1471
+ }
1472
+ ]
1473
+ },
1474
+ "xmlSearch_Search_notDeletedByUrlHashTimestamp": {
1475
+ "code": "(async function(input, output) {\n const mapper =\n (obj) => obj.state != 'deleted' && obj.url && ({\n id: `\"${crypto.createHash('sha1').update(obj.url || '').digest('hex')}\"` +\n `:\"${obj.timestamp}\"_${obj.id}`,\n to: obj.id\n })\n await input.table('xmlSearch_Search').onChange(\n (obj, oldObj) => output.change(obj && mapper(obj), oldObj && mapper(oldObj))\n )\n })",
1476
+ "parameters": {},
1477
+ "uid": "a234d2feb9ee89a2",
1478
+ "sources": [
1479
+ {
1480
+ "type": "table",
1481
+ "name": "xmlSearch_Search"
1482
+ }
1483
+ ]
1484
+ },
1485
+ "xmlSearch_Search_user": {
1486
+ "code": "(async function(input, output, { table, properties }) {\n const mapper = (obj) => ({\n id: properties.map(path => {\n let at = obj\n for(const p of path) at = at && at[p]\n return at === undefined ? '' : JSON.stringify(at)\n }).join(':')+'_'+obj.id,\n to: obj.id\n })\n await input.table(table).onChange((obj, oldObj) =>\n output.change(obj && mapper(obj), oldObj && mapper(oldObj)) )\n })",
1487
+ "parameters": {
1488
+ "properties": [
1489
+ [
1490
+ "user"
1491
+ ]
1492
+ ],
1493
+ "table": "xmlSearch_Search"
1494
+ },
1495
+ "uid": "a1e3eb19b5e6555d",
1496
+ "sources": [
1497
+ {
1498
+ "type": "table",
1499
+ "name": "xmlSearch_Search"
1500
+ }
1501
+ ]
1502
+ },
1503
+ "xmlSearch_Search_session": {
1504
+ "code": "(async function(input, output, { table, properties }) {\n const mapper = (obj) => ({\n id: properties.map(path => {\n let at = obj\n for(const p of path) at = at && at[p]\n return at === undefined ? '' : JSON.stringify(at)\n }).join(':')+'_'+obj.id,\n to: obj.id\n })\n await input.table(table).onChange((obj, oldObj) =>\n output.change(obj && mapper(obj), oldObj && mapper(oldObj)) )\n })",
1505
+ "parameters": {
1506
+ "properties": [
1507
+ [
1508
+ "session"
1509
+ ]
1510
+ ],
1511
+ "table": "xmlSearch_Search"
1512
+ },
1513
+ "uid": "98a0445d6777c158",
1514
+ "sources": [
1515
+ {
1516
+ "type": "table",
1517
+ "name": "xmlSearch_Search"
1518
+ }
1519
+ ]
1520
+ },
1521
+ "xmlSearch_Generator_bySession": {
1522
+ "code": "(async function(input, output, { table, properties }) {\n const mapper = (obj) => ({\n id: properties.map(path => {\n let at = obj\n for(const p of path) at = at && at[p]\n return at === undefined ? '' : JSON.stringify(at)\n }).join(':')+'_'+obj.id,\n to: obj.id\n })\n await input.table(table).onChange((obj, oldObj) =>\n output.change(obj && mapper(obj), oldObj && mapper(oldObj)) )\n })",
1523
+ "parameters": {
1524
+ "properties": [
1525
+ [
1526
+ "session"
1527
+ ],
1528
+ [
1529
+ "timestamp"
1530
+ ]
1531
+ ],
1532
+ "table": "xmlSearch_Generator"
1533
+ },
1534
+ "uid": "9e10613848b0ed0c",
1535
+ "sources": [
1536
+ {
1537
+ "type": "table",
1538
+ "name": "xmlSearch_Generator"
1539
+ }
1540
+ ]
1541
+ },
1542
+ "xmlSearch_Generator_byUser": {
1543
+ "code": "(async function(input, output, { table, properties }) {\n const mapper = (obj) => ({\n id: properties.map(path => {\n let at = obj\n for(const p of path) at = at && at[p]\n return at === undefined ? '' : JSON.stringify(at)\n }).join(':')+'_'+obj.id,\n to: obj.id\n })\n await input.table(table).onChange((obj, oldObj) =>\n output.change(obj && mapper(obj), oldObj && mapper(oldObj)) )\n })",
1544
+ "parameters": {
1545
+ "properties": [
1546
+ [
1547
+ "user"
1548
+ ],
1549
+ [
1550
+ "timestamp"
1551
+ ]
1552
+ ],
1553
+ "table": "xmlSearch_Generator"
1554
+ },
1555
+ "uid": "17cf858191c832b5",
1556
+ "sources": [
1557
+ {
1558
+ "type": "table",
1559
+ "name": "xmlSearch_Generator"
1560
+ }
1561
+ ]
1562
+ },
1563
+ "xmlSearch_Generator_bySessionUrlHash": {
1564
+ "code": "(async function(input, output) {\n const mapper =\n (obj) => obj.url && ({\n id: `\"${obj.session}\"`+\n `:\"${crypto.createHash('sha1').update(obj.url).digest('hex')}\"`+\n `_${obj.id}`,\n to: obj.id\n })\n await input.table('xmlSearch_Generator').onChange(\n (obj, oldObj) => output.change(obj && mapper(obj), oldObj && mapper(oldObj))\n )\n })",
1565
+ "parameters": {},
1566
+ "uid": "c3486642fa389e72",
1567
+ "sources": [
1568
+ {
1569
+ "type": "table",
1570
+ "name": "xmlSearch_Generator"
1571
+ }
1572
+ ]
1573
+ },
1574
+ "xmlSearch_Generator_byUserUrlHash": {
1575
+ "code": "(async function(input, output) {\n const mapper =\n (obj) => obj.url && ({\n id: `\"${obj.user}\"`+\n `:\"${crypto.createHash('sha1').update(obj.url).digest('hex')}\"`+\n `_${obj.id}`,\n to: obj.id\n })\n await input.table('xmlSearch_Generator').onChange(\n (obj, oldObj) => output.change(obj && mapper(obj), oldObj && mapper(oldObj))\n )\n })",
1576
+ "parameters": {},
1577
+ "uid": "ba370f8578471786",
1578
+ "sources": [
1579
+ {
1580
+ "type": "table",
1581
+ "name": "xmlSearch_Generator"
1582
+ }
1583
+ ]
1584
+ },
1585
+ "xmlSearch_Generator_bySessionUrlHashQueryHash": {
1586
+ "code": "(async function(input, output) {\n const mapper =\n (obj) => obj.url && ({\n id: `\"${obj.session}\"`+\n `:\"${crypto.createHash('sha1').update(obj.url).digest('hex')}\"`+\n `:\"${crypto.createHash('sha1').update(JSON.stringify(obj.query)).digest('hex')}\"`+\n `_${obj.id}`,\n to: obj.id\n })\n await input.table('xmlSearch_Generator').onChange(\n (obj, oldObj) => output.change(obj && mapper(obj), oldObj && mapper(oldObj))\n )\n })",
1587
+ "parameters": {},
1588
+ "uid": "58434d1e83d9a4cc",
1589
+ "sources": [
1590
+ {
1591
+ "type": "table",
1592
+ "name": "xmlSearch_Generator"
1593
+ }
1594
+ ]
1595
+ },
1596
+ "xmlSearch_Generator_byUserUrlHashQueryHash": {
1597
+ "code": "(async function(input, output) {\n const mapper =\n (obj) => obj.url && ({\n id: `\"${obj.user}\"`+\n `:\"${crypto.createHash('sha1').update(obj.url).digest('hex')}\"`+\n `:\"${crypto.createHash('sha1').update(JSON.stringify(obj.query)).digest('hex')}\"`+\n `_${obj.id}`,\n to: obj.id\n })\n await input.table('xmlSearch_Generator').onChange(\n (obj, oldObj) => output.change(obj && mapper(obj), oldObj && mapper(oldObj))\n )\n })",
1598
+ "parameters": {},
1599
+ "uid": "abf170c22dcff2ed",
1600
+ "sources": [
1601
+ {
1602
+ "type": "table",
1603
+ "name": "xmlSearch_Generator"
1604
+ }
1605
+ ]
1606
+ },
1607
+ "xmlSearch_Generator_byDataSet": {
1608
+ "code": "(async function(input, output, { table, properties }) {\n const mapper = (obj) => ({\n id: properties.map(path => {\n let at = obj\n for(const p of path) at = at && at[p]\n return at === undefined ? '' : JSON.stringify(at)\n }).join(':')+'_'+obj.id,\n to: obj.id\n })\n await input.table(table).onChange((obj, oldObj) =>\n output.change(obj && mapper(obj), oldObj && mapper(oldObj)) )\n })",
1609
+ "parameters": {
1610
+ "properties": [
1611
+ [
1612
+ "dataSet"
1613
+ ]
1614
+ ],
1615
+ "table": "xmlSearch_Generator"
1616
+ },
1617
+ "uid": "c962896748d83bba",
1618
+ "sources": [
1619
+ {
1620
+ "type": "table",
1621
+ "name": "xmlSearch_Generator"
1622
+ }
1623
+ ]
1624
+ },
1625
+ "xmlSearch_Generator_notDeletedByTimestamp": {
1626
+ "code": "(async function(input, output) {\n const mapper =\n (obj) => obj.state != 'deleted' &&\n ({ id: `${JSON.stringify(obj.timestamp)}_${obj.id}`, to: obj.id })\n await input.table('xmlSearch_Generator').onChange(\n (obj, oldObj) => output.change(obj && mapper(obj), oldObj && mapper(oldObj))\n )\n })",
1627
+ "parameters": {},
1628
+ "uid": "1c9eddf6ac9b3d47",
1629
+ "sources": [
1630
+ {
1631
+ "type": "table",
1632
+ "name": "xmlSearch_Generator"
1633
+ }
1634
+ ]
1635
+ },
1636
+ "xmlSearch_Generator_user": {
1637
+ "code": "(async function(input, output, { table, properties }) {\n const mapper = (obj) => ({\n id: properties.map(path => {\n let at = obj\n for(const p of path) at = at && at[p]\n return at === undefined ? '' : JSON.stringify(at)\n }).join(':')+'_'+obj.id,\n to: obj.id\n })\n await input.table(table).onChange((obj, oldObj) =>\n output.change(obj && mapper(obj), oldObj && mapper(oldObj)) )\n })",
1638
+ "parameters": {
1639
+ "properties": [
1640
+ [
1641
+ "user"
1642
+ ]
1643
+ ],
1644
+ "table": "xmlSearch_Generator"
1645
+ },
1646
+ "uid": "c8645b2966a0bd03",
1647
+ "sources": [
1648
+ {
1649
+ "type": "table",
1650
+ "name": "xmlSearch_Generator"
1651
+ }
1652
+ ]
1653
+ },
1654
+ "xmlSearch_Generator_session": {
1655
+ "code": "(async function(input, output, { table, properties }) {\n const mapper = (obj) => ({\n id: properties.map(path => {\n let at = obj\n for(const p of path) at = at && at[p]\n return at === undefined ? '' : JSON.stringify(at)\n }).join(':')+'_'+obj.id,\n to: obj.id\n })\n await input.table(table).onChange((obj, oldObj) =>\n output.change(obj && mapper(obj), oldObj && mapper(oldObj)) )\n })",
1656
+ "parameters": {
1657
+ "properties": [
1658
+ [
1659
+ "session"
1660
+ ]
1661
+ ],
1662
+ "table": "xmlSearch_Generator"
1663
+ },
1664
+ "uid": "65b2b2bad832aeb5",
1665
+ "sources": [
1666
+ {
1667
+ "type": "table",
1668
+ "name": "xmlSearch_Generator"
1669
+ }
1670
+ ]
1671
+ },
1672
+ "xmlExclusions_ExclusionsCheck_bySessionDataSetExclusionsListStrict": {
1673
+ "code": "(async function(input, output, { table, properties }) {\n const mapper = (obj) => ({\n id: properties.map(path => {\n let at = obj\n for(const p of path) at = at && at[p]\n return at === undefined ? '' : JSON.stringify(at)\n }).join(':')+'_'+obj.id,\n to: obj.id\n })\n await input.table(table).onChange((obj, oldObj) =>\n output.change(obj && mapper(obj), oldObj && mapper(oldObj)) )\n })",
1674
+ "parameters": {
1675
+ "properties": [
1676
+ [
1677
+ "session"
1678
+ ],
1679
+ [
1680
+ "dataSet"
1681
+ ],
1682
+ [
1683
+ "exclusionsList"
1684
+ ],
1685
+ [
1686
+ "useStrict"
1687
+ ]
1688
+ ],
1689
+ "table": "xmlExclusions_ExclusionsCheck"
1690
+ },
1691
+ "uid": "da3b64ab1bc8787e",
1692
+ "sources": [
1693
+ {
1694
+ "type": "table",
1695
+ "name": "xmlExclusions_ExclusionsCheck"
1696
+ }
1697
+ ]
1698
+ },
1699
+ "xmlExclusions_ExclusionsCheck_byUserDataSetExclusionsListStrict": {
1700
+ "code": "(async function(input, output, { table, properties }) {\n const mapper = (obj) => ({\n id: properties.map(path => {\n let at = obj\n for(const p of path) at = at && at[p]\n return at === undefined ? '' : JSON.stringify(at)\n }).join(':')+'_'+obj.id,\n to: obj.id\n })\n await input.table(table).onChange((obj, oldObj) =>\n output.change(obj && mapper(obj), oldObj && mapper(oldObj)) )\n })",
1701
+ "parameters": {
1702
+ "properties": [
1703
+ [
1704
+ "user"
1705
+ ],
1706
+ [
1707
+ "dataSet"
1708
+ ],
1709
+ [
1710
+ "exclusionsList"
1711
+ ],
1712
+ [
1713
+ "useStrict"
1714
+ ]
1715
+ ],
1716
+ "table": "xmlExclusions_ExclusionsCheck"
1717
+ },
1718
+ "uid": "b86c9c3d0e81b305",
1719
+ "sources": [
1720
+ {
1721
+ "type": "table",
1722
+ "name": "xmlExclusions_ExclusionsCheck"
1723
+ }
1724
+ ]
1725
+ },
1726
+ "xmlExclusions_ExclusionsCheck_user": {
1727
+ "code": "(async function(input, output, { table, properties }) {\n const mapper = (obj) => ({\n id: properties.map(path => {\n let at = obj\n for(const p of path) at = at && at[p]\n return at === undefined ? '' : JSON.stringify(at)\n }).join(':')+'_'+obj.id,\n to: obj.id\n })\n await input.table(table).onChange((obj, oldObj) =>\n output.change(obj && mapper(obj), oldObj && mapper(oldObj)) )\n })",
1728
+ "parameters": {
1729
+ "properties": [
1730
+ [
1731
+ "user"
1732
+ ]
1733
+ ],
1734
+ "table": "xmlExclusions_ExclusionsCheck"
1735
+ },
1736
+ "uid": "a678d81b7f81c1a2",
1737
+ "sources": [
1738
+ {
1739
+ "type": "table",
1740
+ "name": "xmlExclusions_ExclusionsCheck"
1741
+ }
1742
+ ]
1743
+ },
1744
+ "xmlExclusions_ExclusionsCheck_session": {
1745
+ "code": "(async function(input, output, { table, properties }) {\n const mapper = (obj) => ({\n id: properties.map(path => {\n let at = obj\n for(const p of path) at = at && at[p]\n return at === undefined ? '' : JSON.stringify(at)\n }).join(':')+'_'+obj.id,\n to: obj.id\n })\n await input.table(table).onChange((obj, oldObj) =>\n output.change(obj && mapper(obj), oldObj && mapper(oldObj)) )\n })",
1746
+ "parameters": {
1747
+ "properties": [
1748
+ [
1749
+ "session"
1750
+ ]
1751
+ ],
1752
+ "table": "xmlExclusions_ExclusionsCheck"
1753
+ },
1754
+ "uid": "2e07f33c915a8dbe",
1755
+ "sources": [
1756
+ {
1757
+ "type": "table",
1758
+ "name": "xmlExclusions_ExclusionsCheck"
1759
+ }
1760
+ ]
1761
+ },
1762
+ "messageAuthentication_Authentication_byContact": {
1763
+ "code": "(async function(input, output, { table, properties }) {\n const mapper = (obj) => ({\n id: properties.map(path => {\n let at = obj\n for(const p of path) at = at && at[p]\n return at === undefined ? '' : JSON.stringify(at)\n }).join(':')+'_'+obj.id,\n to: obj.id\n })\n await input.table(table).onChange((obj, oldObj) =>\n output.change(obj && mapper(obj), oldObj && mapper(oldObj)) )\n })",
1764
+ "parameters": {
1765
+ "properties": [
1766
+ [
1767
+ "contactType"
1768
+ ],
1769
+ [
1770
+ "contact"
1771
+ ]
1772
+ ],
1773
+ "table": "messageAuthentication_Authentication"
1774
+ },
1775
+ "uid": "6f82e55dac91add8",
1776
+ "sources": [
1777
+ {
1778
+ "type": "table",
1779
+ "name": "messageAuthentication_Authentication"
1780
+ }
1781
+ ]
1782
+ }
1783
+ },
1784
+ "logs": {
1785
+ "events": {
1786
+ "uid": "d4b5acbb8125b7f8"
1787
+ }
1788
+ },
1789
+ "storage": {
1790
+ "noMetaSync": true,
1791
+ "noSync": true
1792
+ }
1793
+ }
1794
+ },
1795
+ "timestamp": 1706509926823
1796
+ }