@openfn/language-godata 3.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.
package/ast.json ADDED
@@ -0,0 +1,1226 @@
1
+ {
2
+ "operations": [
3
+ {
4
+ "name": "listContacts",
5
+ "params": [
6
+ "id",
7
+ "callback"
8
+ ],
9
+ "docs": {
10
+ "description": "Fetch the list of contacts within a particular outbreak using its ID.",
11
+ "tags": [
12
+ {
13
+ "title": "public",
14
+ "description": null,
15
+ "type": null
16
+ },
17
+ {
18
+ "title": "example",
19
+ "description": "listContacts(\"343d-dc3e\", // Outbreak Id\n state => {\n console.log(state);\n return state;\n });"
20
+ },
21
+ {
22
+ "title": "function",
23
+ "description": null,
24
+ "name": null
25
+ },
26
+ {
27
+ "title": "param",
28
+ "description": "Outbreak id",
29
+ "type": {
30
+ "type": "NameExpression",
31
+ "name": "string"
32
+ },
33
+ "name": "id"
34
+ },
35
+ {
36
+ "title": "param",
37
+ "description": "(Optional) Callback function",
38
+ "type": {
39
+ "type": "NameExpression",
40
+ "name": "function"
41
+ },
42
+ "name": "callback"
43
+ },
44
+ {
45
+ "title": "returns",
46
+ "description": null,
47
+ "type": {
48
+ "type": "NameExpression",
49
+ "name": "Operation"
50
+ }
51
+ }
52
+ ]
53
+ },
54
+ "valid": true
55
+ },
56
+ {
57
+ "name": "getContact",
58
+ "params": [
59
+ "id",
60
+ "query",
61
+ "callback"
62
+ ],
63
+ "docs": {
64
+ "description": "Get one or multiple contacts within an outbreak from a query filter",
65
+ "tags": [
66
+ {
67
+ "title": "public",
68
+ "description": null,
69
+ "type": null
70
+ },
71
+ {
72
+ "title": "example",
73
+ "description": "getContact(\"343d-dc3e\", {\"where\":{\"firstName\": \"Luca\"}}, state => {\n console.log(state.data);\n return state;\n });"
74
+ },
75
+ {
76
+ "title": "function",
77
+ "description": null,
78
+ "name": null
79
+ },
80
+ {
81
+ "title": "param",
82
+ "description": "Outbreak id",
83
+ "type": {
84
+ "type": "NameExpression",
85
+ "name": "string"
86
+ },
87
+ "name": "id"
88
+ },
89
+ {
90
+ "title": "param",
91
+ "description": "An object with a query filter parameter",
92
+ "type": {
93
+ "type": "NameExpression",
94
+ "name": "object"
95
+ },
96
+ "name": "query"
97
+ },
98
+ {
99
+ "title": "param",
100
+ "description": "(Optional) Callback function",
101
+ "type": {
102
+ "type": "NameExpression",
103
+ "name": "function"
104
+ },
105
+ "name": "callback"
106
+ },
107
+ {
108
+ "title": "returns",
109
+ "description": null,
110
+ "type": {
111
+ "type": "NameExpression",
112
+ "name": "Operation"
113
+ }
114
+ }
115
+ ]
116
+ },
117
+ "valid": true
118
+ },
119
+ {
120
+ "name": "upsertContact",
121
+ "params": [
122
+ "id",
123
+ "externalId",
124
+ "goDataContact",
125
+ "callback"
126
+ ],
127
+ "docs": {
128
+ "description": "Upsert contact to godata using an external id to match a specific record.",
129
+ "tags": [
130
+ {
131
+ "title": "public",
132
+ "description": null,
133
+ "type": null
134
+ },
135
+ {
136
+ "title": "example",
137
+ "description": "upsertContact(\"4dce-3eedce3-rd33\", 'visualId',\n {\n firstName: 'Luca',\n gender: 'male',\n 'age:years': '20'\n ...\n }\n )"
138
+ },
139
+ {
140
+ "title": "function",
141
+ "description": null,
142
+ "name": null
143
+ },
144
+ {
145
+ "title": "param",
146
+ "description": "Outbreak id",
147
+ "type": {
148
+ "type": "NameExpression",
149
+ "name": "string"
150
+ },
151
+ "name": "id"
152
+ },
153
+ {
154
+ "title": "param",
155
+ "description": "External Id to match",
156
+ "type": {
157
+ "type": "NameExpression",
158
+ "name": "string"
159
+ },
160
+ "name": "externalId"
161
+ },
162
+ {
163
+ "title": "param",
164
+ "description": "an object with some case data.",
165
+ "type": {
166
+ "type": "NameExpression",
167
+ "name": "object"
168
+ },
169
+ "name": "goDataContact"
170
+ },
171
+ {
172
+ "title": "param",
173
+ "description": "(Optional) Callback function",
174
+ "type": {
175
+ "type": "NameExpression",
176
+ "name": "function"
177
+ },
178
+ "name": "callback"
179
+ },
180
+ {
181
+ "title": "returns",
182
+ "description": null,
183
+ "type": {
184
+ "type": "NameExpression",
185
+ "name": "Operation"
186
+ }
187
+ }
188
+ ]
189
+ },
190
+ "valid": true
191
+ },
192
+ {
193
+ "name": "listOutbreaks",
194
+ "params": [
195
+ "callback"
196
+ ],
197
+ "docs": {
198
+ "description": "Fetch the list of outbreaks",
199
+ "tags": [
200
+ {
201
+ "title": "public",
202
+ "description": null,
203
+ "type": null
204
+ },
205
+ {
206
+ "title": "example",
207
+ "description": "listOutbreaks(state => {\n console.log(state.data);\n return state;\n });"
208
+ },
209
+ {
210
+ "title": "function",
211
+ "description": null,
212
+ "name": null
213
+ },
214
+ {
215
+ "title": "param",
216
+ "description": "(Optional) Callback function",
217
+ "type": {
218
+ "type": "NameExpression",
219
+ "name": "function"
220
+ },
221
+ "name": "callback"
222
+ },
223
+ {
224
+ "title": "returns",
225
+ "description": null,
226
+ "type": {
227
+ "type": "NameExpression",
228
+ "name": "Operation"
229
+ }
230
+ }
231
+ ]
232
+ },
233
+ "valid": true
234
+ },
235
+ {
236
+ "name": "getOutbreak",
237
+ "params": [
238
+ "query",
239
+ "callback"
240
+ ],
241
+ "docs": {
242
+ "description": "Get one or multiple outbreaks from a query filter",
243
+ "tags": [
244
+ {
245
+ "title": "public",
246
+ "description": null,
247
+ "type": null
248
+ },
249
+ {
250
+ "title": "example",
251
+ "description": "getOutbreak({\"where\":{\"name\": \"Outbreak demo\"}}, state => {\n console.log(state.data);\n return state;\n });"
252
+ },
253
+ {
254
+ "title": "function",
255
+ "description": null,
256
+ "name": null
257
+ },
258
+ {
259
+ "title": "param",
260
+ "description": "An object with a query filter parameter",
261
+ "type": {
262
+ "type": "NameExpression",
263
+ "name": "object"
264
+ },
265
+ "name": "query"
266
+ },
267
+ {
268
+ "title": "param",
269
+ "description": "(Optional) Callback function",
270
+ "type": {
271
+ "type": "NameExpression",
272
+ "name": "function"
273
+ },
274
+ "name": "callback"
275
+ },
276
+ {
277
+ "title": "returns",
278
+ "description": null,
279
+ "type": {
280
+ "type": "NameExpression",
281
+ "name": "Operation"
282
+ }
283
+ }
284
+ ]
285
+ },
286
+ "valid": true
287
+ },
288
+ {
289
+ "name": "upsertOutbreak",
290
+ "params": [
291
+ "outbreak",
292
+ "callback"
293
+ ],
294
+ "docs": {
295
+ "description": "Upsert outbreak to godata",
296
+ "tags": [
297
+ {
298
+ "title": "public",
299
+ "description": null,
300
+ "type": null
301
+ },
302
+ {
303
+ "title": "example",
304
+ "description": "upsertOutbreak({externalId: \"3dec33-ede3\", data: {...}})"
305
+ },
306
+ {
307
+ "title": "function",
308
+ "description": null,
309
+ "name": null
310
+ },
311
+ {
312
+ "title": "param",
313
+ "description": "an object with an externalId and some outbreak data.",
314
+ "type": {
315
+ "type": "NameExpression",
316
+ "name": "object"
317
+ },
318
+ "name": "outbreak"
319
+ },
320
+ {
321
+ "title": "param",
322
+ "description": "(Optional) Callback function",
323
+ "type": {
324
+ "type": "NameExpression",
325
+ "name": "function"
326
+ },
327
+ "name": "callback"
328
+ },
329
+ {
330
+ "title": "returns",
331
+ "description": null,
332
+ "type": {
333
+ "type": "NameExpression",
334
+ "name": "Operation"
335
+ }
336
+ }
337
+ ]
338
+ },
339
+ "valid": true
340
+ },
341
+ {
342
+ "name": "listCases",
343
+ "params": [
344
+ "id",
345
+ "callback"
346
+ ],
347
+ "docs": {
348
+ "description": "Fetch the list of cases within a particular outbreak using its ID.",
349
+ "tags": [
350
+ {
351
+ "title": "public",
352
+ "description": null,
353
+ "type": null
354
+ },
355
+ {
356
+ "title": "example",
357
+ "description": "listCases(\"343d-dc3e\", state => {\n console.log(state);\n return state;\n });"
358
+ },
359
+ {
360
+ "title": "function",
361
+ "description": null,
362
+ "name": null
363
+ },
364
+ {
365
+ "title": "param",
366
+ "description": "Outbreak id",
367
+ "type": {
368
+ "type": "NameExpression",
369
+ "name": "string"
370
+ },
371
+ "name": "id"
372
+ },
373
+ {
374
+ "title": "param",
375
+ "description": "(Optional) Callback function",
376
+ "type": {
377
+ "type": "NameExpression",
378
+ "name": "function"
379
+ },
380
+ "name": "callback"
381
+ },
382
+ {
383
+ "title": "returns",
384
+ "description": null,
385
+ "type": {
386
+ "type": "NameExpression",
387
+ "name": "Operation"
388
+ }
389
+ }
390
+ ]
391
+ },
392
+ "valid": true
393
+ },
394
+ {
395
+ "name": "getCase",
396
+ "params": [
397
+ "id",
398
+ "query",
399
+ "callback"
400
+ ],
401
+ "docs": {
402
+ "description": "Get one or multiple cases within an outbreak from a query filter",
403
+ "tags": [
404
+ {
405
+ "title": "public",
406
+ "description": null,
407
+ "type": null
408
+ },
409
+ {
410
+ "title": "example",
411
+ "description": "getCase(\n '3b55-cdf4',\n { 'where.relationship': { active: true }, where: { firstName: 'Luca'} },\n state => {\n console.log(state);\n return state;\n }\n);"
412
+ },
413
+ {
414
+ "title": "function",
415
+ "description": null,
416
+ "name": null
417
+ },
418
+ {
419
+ "title": "param",
420
+ "description": "Outbreak id",
421
+ "type": {
422
+ "type": "NameExpression",
423
+ "name": "string"
424
+ },
425
+ "name": "id"
426
+ },
427
+ {
428
+ "title": "param",
429
+ "description": "An object with a query filter parameter",
430
+ "type": {
431
+ "type": "NameExpression",
432
+ "name": "object"
433
+ },
434
+ "name": "query"
435
+ },
436
+ {
437
+ "title": "param",
438
+ "description": "(Optional) Callback function",
439
+ "type": {
440
+ "type": "NameExpression",
441
+ "name": "function"
442
+ },
443
+ "name": "callback"
444
+ },
445
+ {
446
+ "title": "returns",
447
+ "description": null,
448
+ "type": {
449
+ "type": "NameExpression",
450
+ "name": "Operation"
451
+ }
452
+ }
453
+ ]
454
+ },
455
+ "valid": true
456
+ },
457
+ {
458
+ "name": "upsertCase",
459
+ "params": [
460
+ "id",
461
+ "externalId",
462
+ "goDataCase",
463
+ "callback"
464
+ ],
465
+ "docs": {
466
+ "description": "Upsert case to godata using an external id to mach a specific record",
467
+ "tags": [
468
+ {
469
+ "title": "public",
470
+ "description": null,
471
+ "type": null
472
+ },
473
+ {
474
+ "title": "example",
475
+ "description": "upsertCase(\"4dce-3eedce3-rd33\", 'visualId',\n data: state => {\n const patient = state.data.body;\n return {\n firstName: patient.Patient_name.split(' ')[0],\n lastName: patient.Patient_name.split(' ')[1],\n visualId: patient.Case_ID,\n 'age:years': patient.Age_in_year,\n gender: patient.Sex,\n };\n })"
476
+ },
477
+ {
478
+ "title": "function",
479
+ "description": null,
480
+ "name": null
481
+ },
482
+ {
483
+ "title": "param",
484
+ "description": "Outbreak id",
485
+ "type": {
486
+ "type": "NameExpression",
487
+ "name": "string"
488
+ },
489
+ "name": "id"
490
+ },
491
+ {
492
+ "title": "param",
493
+ "description": "External Id to match",
494
+ "type": {
495
+ "type": "NameExpression",
496
+ "name": "string"
497
+ },
498
+ "name": "externalId"
499
+ },
500
+ {
501
+ "title": "param",
502
+ "description": "an object with some case data.",
503
+ "type": {
504
+ "type": "NameExpression",
505
+ "name": "object"
506
+ },
507
+ "name": "goDataCase"
508
+ },
509
+ {
510
+ "title": "param",
511
+ "description": "(Optional) Callback function",
512
+ "type": {
513
+ "type": "NameExpression",
514
+ "name": "function"
515
+ },
516
+ "name": "callback"
517
+ },
518
+ {
519
+ "title": "returns",
520
+ "description": null,
521
+ "type": {
522
+ "type": "NameExpression",
523
+ "name": "Operation"
524
+ }
525
+ }
526
+ ]
527
+ },
528
+ "valid": true
529
+ },
530
+ {
531
+ "name": "listLocations",
532
+ "params": [
533
+ "callback"
534
+ ],
535
+ "docs": {
536
+ "description": "Fetch the list of locations",
537
+ "tags": [
538
+ {
539
+ "title": "public",
540
+ "description": null,
541
+ "type": null
542
+ },
543
+ {
544
+ "title": "example",
545
+ "description": "listLocations(state => {\n console.log(state.data);\n return state;\n });"
546
+ },
547
+ {
548
+ "title": "function",
549
+ "description": null,
550
+ "name": null
551
+ },
552
+ {
553
+ "title": "param",
554
+ "description": "(Optional) Callback function",
555
+ "type": {
556
+ "type": "NameExpression",
557
+ "name": "function"
558
+ },
559
+ "name": "callback"
560
+ },
561
+ {
562
+ "title": "returns",
563
+ "description": null,
564
+ "type": {
565
+ "type": "NameExpression",
566
+ "name": "Operation"
567
+ }
568
+ }
569
+ ]
570
+ },
571
+ "valid": true
572
+ },
573
+ {
574
+ "name": "getLocation",
575
+ "params": [
576
+ "query",
577
+ "callback"
578
+ ],
579
+ "docs": {
580
+ "description": "Get one or multiple locations from a query filter",
581
+ "tags": [
582
+ {
583
+ "title": "public",
584
+ "description": null,
585
+ "type": null
586
+ },
587
+ {
588
+ "title": "example",
589
+ "description": "getLocation({\"where\":{\"name\": \"30 DE OCTUBRE\"}}, state => {\n console.log(state.data);\n return state;\n });"
590
+ },
591
+ {
592
+ "title": "function",
593
+ "description": null,
594
+ "name": null
595
+ },
596
+ {
597
+ "title": "param",
598
+ "description": "An object with a query filter parameter",
599
+ "type": {
600
+ "type": "NameExpression",
601
+ "name": "object"
602
+ },
603
+ "name": "query"
604
+ },
605
+ {
606
+ "title": "param",
607
+ "description": "(Optional) Callback function",
608
+ "type": {
609
+ "type": "NameExpression",
610
+ "name": "function"
611
+ },
612
+ "name": "callback"
613
+ },
614
+ {
615
+ "title": "returns",
616
+ "description": null,
617
+ "type": {
618
+ "type": "NameExpression",
619
+ "name": "Operation"
620
+ }
621
+ }
622
+ ]
623
+ },
624
+ "valid": true
625
+ },
626
+ {
627
+ "name": "upsertLocation",
628
+ "params": [
629
+ "externalId",
630
+ "goDataLocation",
631
+ "callback"
632
+ ],
633
+ "docs": {
634
+ "description": "Upsert location to godata",
635
+ "tags": [
636
+ {
637
+ "title": "public",
638
+ "description": null,
639
+ "type": null
640
+ },
641
+ {
642
+ "title": "example",
643
+ "description": "upsertLocation('name', {...})"
644
+ },
645
+ {
646
+ "title": "function",
647
+ "description": null,
648
+ "name": null
649
+ },
650
+ {
651
+ "title": "param",
652
+ "description": "External Id to match",
653
+ "type": {
654
+ "type": "NameExpression",
655
+ "name": "string"
656
+ },
657
+ "name": "externalId"
658
+ },
659
+ {
660
+ "title": "param",
661
+ "description": "an object with some location data.",
662
+ "type": {
663
+ "type": "NameExpression",
664
+ "name": "object"
665
+ },
666
+ "name": "goDataLocation"
667
+ },
668
+ {
669
+ "title": "param",
670
+ "description": "(Optional) Callback function",
671
+ "type": {
672
+ "type": "NameExpression",
673
+ "name": "function"
674
+ },
675
+ "name": "callback"
676
+ },
677
+ {
678
+ "title": "returns",
679
+ "description": null,
680
+ "type": {
681
+ "type": "NameExpression",
682
+ "name": "Operation"
683
+ }
684
+ }
685
+ ]
686
+ },
687
+ "valid": true
688
+ },
689
+ {
690
+ "name": "listReferenceData",
691
+ "params": [
692
+ "callback"
693
+ ],
694
+ "docs": {
695
+ "description": "Fetch the list of reference data",
696
+ "tags": [
697
+ {
698
+ "title": "public",
699
+ "description": null,
700
+ "type": null
701
+ },
702
+ {
703
+ "title": "example",
704
+ "description": "listReferenceData(state => {\n console.log(state.data);\n return state;\n });"
705
+ },
706
+ {
707
+ "title": "function",
708
+ "description": null,
709
+ "name": null
710
+ },
711
+ {
712
+ "title": "param",
713
+ "description": "(Optional) Callback function",
714
+ "type": {
715
+ "type": "NameExpression",
716
+ "name": "function"
717
+ },
718
+ "name": "callback"
719
+ },
720
+ {
721
+ "title": "returns",
722
+ "description": null,
723
+ "type": {
724
+ "type": "NameExpression",
725
+ "name": "Operation"
726
+ }
727
+ }
728
+ ]
729
+ },
730
+ "valid": true
731
+ },
732
+ {
733
+ "name": "getReferenceData",
734
+ "params": [
735
+ "query",
736
+ "callback"
737
+ ],
738
+ "docs": {
739
+ "description": "Get one or multiple reference data from a query filter",
740
+ "tags": [
741
+ {
742
+ "title": "public",
743
+ "description": null,
744
+ "type": null
745
+ },
746
+ {
747
+ "title": "example",
748
+ "description": "getReferenceData({\"where\":{\"categoryId\": \"LNG_REFERENCE_DATA_CATEGORY_CENTRE_NAME\"}}, state => {\n console.log(state.data);\n return state;\n });"
749
+ },
750
+ {
751
+ "title": "function",
752
+ "description": null,
753
+ "name": null
754
+ },
755
+ {
756
+ "title": "param",
757
+ "description": "An object with a query filter parameter",
758
+ "type": {
759
+ "type": "NameExpression",
760
+ "name": "object"
761
+ },
762
+ "name": "query"
763
+ },
764
+ {
765
+ "title": "param",
766
+ "description": "(Optional) Callback function",
767
+ "type": {
768
+ "type": "NameExpression",
769
+ "name": "function"
770
+ },
771
+ "name": "callback"
772
+ },
773
+ {
774
+ "title": "returns",
775
+ "description": null,
776
+ "type": {
777
+ "type": "NameExpression",
778
+ "name": "Operation"
779
+ }
780
+ }
781
+ ]
782
+ },
783
+ "valid": true
784
+ },
785
+ {
786
+ "name": "upsertReferenceData",
787
+ "params": [
788
+ "externalId",
789
+ "goDataReferenceData",
790
+ "callback"
791
+ ],
792
+ "docs": {
793
+ "description": "Upsert reference data to godata",
794
+ "tags": [
795
+ {
796
+ "title": "public",
797
+ "description": null,
798
+ "type": null
799
+ },
800
+ {
801
+ "title": "example",
802
+ "description": "upsertReferenceData('id', {...})"
803
+ },
804
+ {
805
+ "title": "function",
806
+ "description": null,
807
+ "name": null
808
+ },
809
+ {
810
+ "title": "param",
811
+ "description": "External Id to match",
812
+ "type": {
813
+ "type": "NameExpression",
814
+ "name": "string"
815
+ },
816
+ "name": "externalId"
817
+ },
818
+ {
819
+ "title": "param",
820
+ "description": "an object with some reference data.",
821
+ "type": {
822
+ "type": "NameExpression",
823
+ "name": "object"
824
+ },
825
+ "name": "goDataReferenceData"
826
+ },
827
+ {
828
+ "title": "param",
829
+ "description": "(Optional) Callback function",
830
+ "type": {
831
+ "type": "NameExpression",
832
+ "name": "function"
833
+ },
834
+ "name": "callback"
835
+ },
836
+ {
837
+ "title": "returns",
838
+ "description": null,
839
+ "type": {
840
+ "type": "NameExpression",
841
+ "name": "Operation"
842
+ }
843
+ }
844
+ ]
845
+ },
846
+ "valid": true
847
+ }
848
+ ],
849
+ "exports": [],
850
+ "common": [
851
+ {
852
+ "name": "sourceValue",
853
+ "params": [
854
+ "path"
855
+ ],
856
+ "docs": {
857
+ "description": "Picks out a single value from source data.\nIf a JSONPath returns more than one value for the reference, the first\nitem will be returned.",
858
+ "tags": [
859
+ {
860
+ "title": "public",
861
+ "description": null,
862
+ "type": null
863
+ },
864
+ {
865
+ "title": "example",
866
+ "description": "sourceValue('$.key')"
867
+ },
868
+ {
869
+ "title": "function",
870
+ "description": null,
871
+ "name": null
872
+ },
873
+ {
874
+ "title": "param",
875
+ "description": "JSONPath referencing a point in `state`.",
876
+ "type": {
877
+ "type": "NameExpression",
878
+ "name": "String"
879
+ },
880
+ "name": "path"
881
+ },
882
+ {
883
+ "title": "returns",
884
+ "description": null,
885
+ "type": {
886
+ "type": "NameExpression",
887
+ "name": "Operation"
888
+ }
889
+ }
890
+ ]
891
+ },
892
+ "valid": true
893
+ },
894
+ {
895
+ "name": "dataPath",
896
+ "params": [
897
+ "path"
898
+ ],
899
+ "docs": {
900
+ "description": "Ensures a path points at the data.",
901
+ "tags": [
902
+ {
903
+ "title": "public",
904
+ "description": null,
905
+ "type": null
906
+ },
907
+ {
908
+ "title": "example",
909
+ "description": "dataPath('key')"
910
+ },
911
+ {
912
+ "title": "function",
913
+ "description": null,
914
+ "name": null
915
+ },
916
+ {
917
+ "title": "param",
918
+ "description": "JSONPath referencing a point in `data`.",
919
+ "type": {
920
+ "type": "NameExpression",
921
+ "name": "string"
922
+ },
923
+ "name": "path"
924
+ },
925
+ {
926
+ "title": "returns",
927
+ "description": null,
928
+ "type": {
929
+ "type": "NameExpression",
930
+ "name": "string"
931
+ }
932
+ }
933
+ ]
934
+ },
935
+ "valid": true
936
+ },
937
+ {
938
+ "name": "dataValue",
939
+ "params": [
940
+ "path"
941
+ ],
942
+ "docs": {
943
+ "description": "Picks out a single value from the source data object—usually `state.data`.\nIf a JSONPath returns more than one value for the reference, the first\nitem will be returned.",
944
+ "tags": [
945
+ {
946
+ "title": "public",
947
+ "description": null,
948
+ "type": null
949
+ },
950
+ {
951
+ "title": "example",
952
+ "description": "dataValue('key')"
953
+ },
954
+ {
955
+ "title": "function",
956
+ "description": null,
957
+ "name": null
958
+ },
959
+ {
960
+ "title": "param",
961
+ "description": "JSONPath referencing a point in `data`.",
962
+ "type": {
963
+ "type": "NameExpression",
964
+ "name": "String"
965
+ },
966
+ "name": "path"
967
+ },
968
+ {
969
+ "title": "returns",
970
+ "description": null,
971
+ "type": {
972
+ "type": "NameExpression",
973
+ "name": "Operation"
974
+ }
975
+ }
976
+ ]
977
+ },
978
+ "valid": true
979
+ },
980
+ {
981
+ "name": "lastReferenceValue",
982
+ "params": [
983
+ "path"
984
+ ],
985
+ "docs": {
986
+ "description": "Picks out the last reference value from source data.",
987
+ "tags": [
988
+ {
989
+ "title": "public",
990
+ "description": null,
991
+ "type": null
992
+ },
993
+ {
994
+ "title": "example",
995
+ "description": "lastReferenceValue('key')"
996
+ },
997
+ {
998
+ "title": "function",
999
+ "description": null,
1000
+ "name": null
1001
+ },
1002
+ {
1003
+ "title": "param",
1004
+ "description": "JSONPath referencing a point in `references`.",
1005
+ "type": {
1006
+ "type": "NameExpression",
1007
+ "name": "String"
1008
+ },
1009
+ "name": "path"
1010
+ },
1011
+ {
1012
+ "title": "returns",
1013
+ "description": null,
1014
+ "type": {
1015
+ "type": "NameExpression",
1016
+ "name": "Operation"
1017
+ }
1018
+ }
1019
+ ]
1020
+ },
1021
+ "valid": true
1022
+ },
1023
+ {
1024
+ "name": "each",
1025
+ "params": [
1026
+ "dataSource",
1027
+ "operation"
1028
+ ],
1029
+ "docs": {
1030
+ "description": "Scopes an array of data based on a JSONPath.\nUseful when the source data has `n` items you would like to map to\nan operation.\nThe operation will receive a slice of the data based of each item\nof the JSONPath provided.\n\nIt also ensures the results of an operation make their way back into\nthe state's references.",
1031
+ "tags": [
1032
+ {
1033
+ "title": "public",
1034
+ "description": null,
1035
+ "type": null
1036
+ },
1037
+ {
1038
+ "title": "example",
1039
+ "description": "each(\"$.[*]\",\n create(\"SObject\",\n field(\"FirstName\", sourceValue(\"$.firstName\"))\n )\n)"
1040
+ },
1041
+ {
1042
+ "title": "function",
1043
+ "description": null,
1044
+ "name": null
1045
+ },
1046
+ {
1047
+ "title": "param",
1048
+ "description": "JSONPath referencing a point in `state`.",
1049
+ "type": {
1050
+ "type": "NameExpression",
1051
+ "name": "DataSource"
1052
+ },
1053
+ "name": "dataSource"
1054
+ },
1055
+ {
1056
+ "title": "param",
1057
+ "description": "The operation needed to be repeated.",
1058
+ "type": {
1059
+ "type": "NameExpression",
1060
+ "name": "Operation"
1061
+ },
1062
+ "name": "operation"
1063
+ },
1064
+ {
1065
+ "title": "returns",
1066
+ "description": null,
1067
+ "type": {
1068
+ "type": "NameExpression",
1069
+ "name": "Operation"
1070
+ }
1071
+ }
1072
+ ]
1073
+ },
1074
+ "valid": true
1075
+ },
1076
+ {
1077
+ "name": "field",
1078
+ "params": [
1079
+ "key",
1080
+ "value"
1081
+ ],
1082
+ "docs": {
1083
+ "description": "Returns a key, value pair in an array.",
1084
+ "tags": [
1085
+ {
1086
+ "title": "public",
1087
+ "description": null,
1088
+ "type": null
1089
+ },
1090
+ {
1091
+ "title": "example",
1092
+ "description": "field('destination_field_name__c', 'value')"
1093
+ },
1094
+ {
1095
+ "title": "function",
1096
+ "description": null,
1097
+ "name": null
1098
+ },
1099
+ {
1100
+ "title": "param",
1101
+ "description": "Name of the field",
1102
+ "type": {
1103
+ "type": "NameExpression",
1104
+ "name": "string"
1105
+ },
1106
+ "name": "key"
1107
+ },
1108
+ {
1109
+ "title": "param",
1110
+ "description": "The value itself or a sourceable operation.",
1111
+ "type": {
1112
+ "type": "NameExpression",
1113
+ "name": "Value"
1114
+ },
1115
+ "name": "value"
1116
+ },
1117
+ {
1118
+ "title": "returns",
1119
+ "description": null,
1120
+ "type": {
1121
+ "type": "NameExpression",
1122
+ "name": "Field"
1123
+ }
1124
+ }
1125
+ ]
1126
+ },
1127
+ "valid": true
1128
+ },
1129
+ {
1130
+ "name": "fields",
1131
+ "params": [
1132
+ "fields"
1133
+ ],
1134
+ "docs": {
1135
+ "description": "Zips key value pairs into an object.",
1136
+ "tags": [
1137
+ {
1138
+ "title": "public",
1139
+ "description": null,
1140
+ "type": null
1141
+ },
1142
+ {
1143
+ "title": "example",
1144
+ "description": "fields(list_of_fields)"
1145
+ },
1146
+ {
1147
+ "title": "function",
1148
+ "description": null,
1149
+ "name": null
1150
+ },
1151
+ {
1152
+ "title": "param",
1153
+ "description": "a list of fields",
1154
+ "type": {
1155
+ "type": "NameExpression",
1156
+ "name": "Fields"
1157
+ },
1158
+ "name": "fields"
1159
+ },
1160
+ {
1161
+ "title": "returns",
1162
+ "description": null,
1163
+ "type": {
1164
+ "type": "NameExpression",
1165
+ "name": "Object"
1166
+ }
1167
+ }
1168
+ ]
1169
+ },
1170
+ "valid": true
1171
+ },
1172
+ {
1173
+ "name": "merge",
1174
+ "params": [
1175
+ "dataSource",
1176
+ "fields"
1177
+ ],
1178
+ "docs": {
1179
+ "description": "Merges fields into each item in an array.",
1180
+ "tags": [
1181
+ {
1182
+ "title": "public",
1183
+ "description": null,
1184
+ "type": null
1185
+ },
1186
+ {
1187
+ "title": "example",
1188
+ "description": "merge(\n \"$.books[*]\",\n fields(\n field( \"publisher\", sourceValue(\"$.publisher\") )\n )\n)"
1189
+ },
1190
+ {
1191
+ "title": "function",
1192
+ "description": null,
1193
+ "name": null
1194
+ },
1195
+ {
1196
+ "title": "param",
1197
+ "description": null,
1198
+ "type": {
1199
+ "type": "NameExpression",
1200
+ "name": "DataSource"
1201
+ },
1202
+ "name": "dataSource"
1203
+ },
1204
+ {
1205
+ "title": "param",
1206
+ "description": "Group of fields to merge in.",
1207
+ "type": {
1208
+ "type": "NameExpression",
1209
+ "name": "Object"
1210
+ },
1211
+ "name": "fields"
1212
+ },
1213
+ {
1214
+ "title": "returns",
1215
+ "description": null,
1216
+ "type": {
1217
+ "type": "NameExpression",
1218
+ "name": "DataSource"
1219
+ }
1220
+ }
1221
+ ]
1222
+ },
1223
+ "valid": true
1224
+ }
1225
+ ]
1226
+ }