@openfn/language-mailchimp 1.0.6 → 1.0.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
|
@@ -1144,7 +1144,7 @@
|
|
|
1144
1144
|
"operation"
|
|
1145
1145
|
],
|
|
1146
1146
|
"docs": {
|
|
1147
|
-
"description": "
|
|
1147
|
+
"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.",
|
|
1148
1148
|
"tags": [
|
|
1149
1149
|
{
|
|
1150
1150
|
"title": "public",
|
|
@@ -1158,7 +1158,18 @@
|
|
|
1158
1158
|
},
|
|
1159
1159
|
{
|
|
1160
1160
|
"title": "example",
|
|
1161
|
-
"description": "each(\
|
|
1161
|
+
"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);",
|
|
1162
|
+
"caption": "Using lazy state ($) to iterate over items in state.data and pass each into an \"insert\" operation"
|
|
1163
|
+
},
|
|
1164
|
+
{
|
|
1165
|
+
"title": "example",
|
|
1166
|
+
"description": "each(\n $.data,\n insert(\"patient\", (state) => ({\n patient_id: state.data.case_id,\n ...state.data\n }))\n);",
|
|
1167
|
+
"caption": "Iterate over items in state.data and pass each one into an \"insert\" operation"
|
|
1168
|
+
},
|
|
1169
|
+
{
|
|
1170
|
+
"title": "example",
|
|
1171
|
+
"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);",
|
|
1172
|
+
"caption": "Using JSON path to iterate over items in state.data and pass each one into an \"insert\" operation"
|
|
1162
1173
|
},
|
|
1163
1174
|
{
|
|
1164
1175
|
"title": "param",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openfn/language-mailchimp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.8",
|
|
4
4
|
"description": "An OpenFn adaptor for use with Mailchimp",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"author": "Open Function Group",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"axios": "^1.7.7",
|
|
17
17
|
"md5": "^2.3.0",
|
|
18
18
|
"undici": "^5.28.4",
|
|
19
|
-
"@openfn/language-common": "2.
|
|
19
|
+
"@openfn/language-common": "2.1.1"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@openfn/simple-ast": "0.4.1",
|