@openfn/language-asana 4.0.4 → 4.0.6
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
|
@@ -720,7 +720,7 @@
|
|
|
720
720
|
"operation"
|
|
721
721
|
],
|
|
722
722
|
"docs": {
|
|
723
|
-
"description": "
|
|
723
|
+
"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.",
|
|
724
724
|
"tags": [
|
|
725
725
|
{
|
|
726
726
|
"title": "public",
|
|
@@ -734,7 +734,18 @@
|
|
|
734
734
|
},
|
|
735
735
|
{
|
|
736
736
|
"title": "example",
|
|
737
|
-
"description": "each(\
|
|
737
|
+
"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);",
|
|
738
|
+
"caption": "Using lazy state ($) to iterate over items in state.data and pass each into an \"insert\" operation"
|
|
739
|
+
},
|
|
740
|
+
{
|
|
741
|
+
"title": "example",
|
|
742
|
+
"description": "each(\n $.data,\n insert(\"patient\", (state) => ({\n patient_id: state.data.case_id,\n ...state.data\n }))\n);",
|
|
743
|
+
"caption": "Iterate over items in state.data and pass each one into an \"insert\" operation"
|
|
744
|
+
},
|
|
745
|
+
{
|
|
746
|
+
"title": "example",
|
|
747
|
+
"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);",
|
|
748
|
+
"caption": "Using JSON path to iterate over items in state.data and pass each one into an \"insert\" operation"
|
|
738
749
|
},
|
|
739
750
|
{
|
|
740
751
|
"title": "param",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openfn/language-asana",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.6",
|
|
4
4
|
"description": "An adaptor to access objects in Asana",
|
|
5
5
|
"homepage": "https://docs.openfn.org",
|
|
6
6
|
"repository": {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"configuration-schema.json"
|
|
25
25
|
],
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@openfn/language-common": "2.
|
|
27
|
+
"@openfn/language-common": "2.2.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@openfn/simple-ast": "0.4.1",
|