@openfn/language-facebook 0.4.6 → 0.4.8
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 +13 -2
- package/package.json +2 -2
package/ast.json
CHANGED
|
@@ -321,7 +321,7 @@
|
|
|
321
321
|
"operation"
|
|
322
322
|
],
|
|
323
323
|
"docs": {
|
|
324
|
-
"description": "
|
|
324
|
+
"description": "Iterates over an array of items and invokes an operation upon each one, where the state\nobject is _scoped_ so that state.data is the item under iteration.\nThe rest of the state object is untouched and can be referenced as usual.\nYou can pass an array directly, or use lazy state or a JSONPath string to\nreference a slice of state.",
|
|
325
325
|
"tags": [
|
|
326
326
|
{
|
|
327
327
|
"title": "public",
|
|
@@ -335,7 +335,18 @@
|
|
|
335
335
|
},
|
|
336
336
|
{
|
|
337
337
|
"title": "example",
|
|
338
|
-
"description": "each(\
|
|
338
|
+
"description": "each(\n $.data,\n // Inside the callback operation, `$.data` is scoped to the item under iteration\n insert(\"patient\", {\n patient_name: $.data.properties.case_name,\n patient_id: $.data.case_id,\n })\n);",
|
|
339
|
+
"caption": "Using lazy state ($) to iterate over items in state.data and pass each into an \"insert\" operation"
|
|
340
|
+
},
|
|
341
|
+
{
|
|
342
|
+
"title": "example",
|
|
343
|
+
"description": "each(\n $.data,\n insert(\"patient\", (state) => ({\n patient_id: state.data.case_id,\n ...state.data\n }))\n);",
|
|
344
|
+
"caption": "Iterate over items in state.data and pass each one into an \"insert\" operation"
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
"title": "example",
|
|
348
|
+
"description": "each(\n \"$.data[*]\",\n insert(\"patient\", (state) => ({\n patient_name: state.data.properties.case_name,\n patient_id: state.data.case_id,\n }))\n);",
|
|
349
|
+
"caption": "Using JSON path to iterate over items in state.data and pass each one into an \"insert\" operation"
|
|
339
350
|
},
|
|
340
351
|
{
|
|
341
352
|
"title": "param",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openfn/language-facebook",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.8",
|
|
4
4
|
"description": "An Language Package for Facebook Messenger API",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"author": "Open Function Group",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
],
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"request": "^2.88.2",
|
|
16
|
-
"@openfn/language-common": "2.
|
|
16
|
+
"@openfn/language-common": "2.2.0"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"@openfn/simple-ast": "0.4.1",
|