@openfn/language-inform 1.0.1 → 1.1.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 CHANGED
@@ -1102,6 +1102,60 @@
1102
1102
  ]
1103
1103
  },
1104
1104
  "valid": false
1105
+ },
1106
+ {
1107
+ "name": "as",
1108
+ "params": [
1109
+ "key",
1110
+ "operation"
1111
+ ],
1112
+ "docs": {
1113
+ "description": "Run an operation and save the result to a custom key in state instead of overwriting state.data.",
1114
+ "tags": [
1115
+ {
1116
+ "title": "public",
1117
+ "description": null,
1118
+ "type": null
1119
+ },
1120
+ {
1121
+ "title": "function",
1122
+ "description": null,
1123
+ "name": null
1124
+ },
1125
+ {
1126
+ "title": "example",
1127
+ "description": "as('cceData', collections.get('cce-data-dhis2', { key: `*:*:${$.syncedAt}*` }));",
1128
+ "caption": "Fetch cce-data from collections and store them under state.cceData"
1129
+ },
1130
+ {
1131
+ "title": "param",
1132
+ "description": "The state key to assign the result of the operation to.",
1133
+ "type": {
1134
+ "type": "NameExpression",
1135
+ "name": "string"
1136
+ },
1137
+ "name": "key"
1138
+ },
1139
+ {
1140
+ "title": "param",
1141
+ "description": " An operation that returns a new state object with a `data` property",
1142
+ "type": {
1143
+ "type": "NameExpression",
1144
+ "name": "function"
1145
+ },
1146
+ "name": "operation"
1147
+ },
1148
+ {
1149
+ "title": "returns",
1150
+ "description": null,
1151
+ "type": {
1152
+ "type": "NameExpression",
1153
+ "name": "Operation"
1154
+ }
1155
+ }
1156
+ ]
1157
+ },
1158
+ "valid": true
1105
1159
  }
1106
1160
  ]
1107
1161
  }