@openfn/language-asana 4.1.0 → 4.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 +54 -0
- package/dist/index.cjs +3 -0
- package/dist/index.js +4 -1
- package/package.json +2 -2
- package/types/Adaptor.d.ts +1 -1
package/ast.json
CHANGED
|
@@ -1073,6 +1073,60 @@
|
|
|
1073
1073
|
]
|
|
1074
1074
|
},
|
|
1075
1075
|
"valid": false
|
|
1076
|
+
},
|
|
1077
|
+
{
|
|
1078
|
+
"name": "as",
|
|
1079
|
+
"params": [
|
|
1080
|
+
"key",
|
|
1081
|
+
"operation"
|
|
1082
|
+
],
|
|
1083
|
+
"docs": {
|
|
1084
|
+
"description": "Run an operation and save the result to a custom key in state instead of overwriting state.data.",
|
|
1085
|
+
"tags": [
|
|
1086
|
+
{
|
|
1087
|
+
"title": "public",
|
|
1088
|
+
"description": null,
|
|
1089
|
+
"type": null
|
|
1090
|
+
},
|
|
1091
|
+
{
|
|
1092
|
+
"title": "function",
|
|
1093
|
+
"description": null,
|
|
1094
|
+
"name": null
|
|
1095
|
+
},
|
|
1096
|
+
{
|
|
1097
|
+
"title": "example",
|
|
1098
|
+
"description": "as('cceData', collections.get('cce-data-dhis2', { key: `*:*:${$.syncedAt}*` }));",
|
|
1099
|
+
"caption": "Fetch cce-data from collections and store them under state.cceData"
|
|
1100
|
+
},
|
|
1101
|
+
{
|
|
1102
|
+
"title": "param",
|
|
1103
|
+
"description": "The state key to assign the result of the operation to.",
|
|
1104
|
+
"type": {
|
|
1105
|
+
"type": "NameExpression",
|
|
1106
|
+
"name": "string"
|
|
1107
|
+
},
|
|
1108
|
+
"name": "key"
|
|
1109
|
+
},
|
|
1110
|
+
{
|
|
1111
|
+
"title": "param",
|
|
1112
|
+
"description": " An operation that returns a new state object with a `data` property",
|
|
1113
|
+
"type": {
|
|
1114
|
+
"type": "NameExpression",
|
|
1115
|
+
"name": "function"
|
|
1116
|
+
},
|
|
1117
|
+
"name": "operation"
|
|
1118
|
+
},
|
|
1119
|
+
{
|
|
1120
|
+
"title": "returns",
|
|
1121
|
+
"description": null,
|
|
1122
|
+
"type": {
|
|
1123
|
+
"type": "NameExpression",
|
|
1124
|
+
"name": "Operation"
|
|
1125
|
+
}
|
|
1126
|
+
}
|
|
1127
|
+
]
|
|
1128
|
+
},
|
|
1129
|
+
"valid": true
|
|
1076
1130
|
}
|
|
1077
1131
|
]
|
|
1078
1132
|
}
|
package/dist/index.cjs
CHANGED
|
@@ -20,6 +20,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
var src_exports = {};
|
|
21
21
|
__export(src_exports, {
|
|
22
22
|
alterState: () => import_language_common3.alterState,
|
|
23
|
+
as: () => import_language_common3.as,
|
|
23
24
|
createTask: () => createTask,
|
|
24
25
|
createTaskStory: () => createTaskStory,
|
|
25
26
|
cursor: () => import_language_common3.cursor,
|
|
@@ -49,6 +50,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
49
50
|
var Adaptor_exports = {};
|
|
50
51
|
__export(Adaptor_exports, {
|
|
51
52
|
alterState: () => import_language_common3.alterState,
|
|
53
|
+
as: () => import_language_common3.as,
|
|
52
54
|
createTask: () => createTask,
|
|
53
55
|
createTaskStory: () => createTaskStory,
|
|
54
56
|
cursor: () => import_language_common3.cursor,
|
|
@@ -294,6 +296,7 @@ var src_default = Adaptor_exports;
|
|
|
294
296
|
// Annotate the CommonJS export names for ESM import in node:
|
|
295
297
|
0 && (module.exports = {
|
|
296
298
|
alterState,
|
|
299
|
+
as,
|
|
297
300
|
createTask,
|
|
298
301
|
createTaskStory,
|
|
299
302
|
cursor,
|
package/dist/index.js
CHANGED
|
@@ -8,6 +8,7 @@ var __export = (target, all) => {
|
|
|
8
8
|
var Adaptor_exports = {};
|
|
9
9
|
__export(Adaptor_exports, {
|
|
10
10
|
alterState: () => alterState,
|
|
11
|
+
as: () => as,
|
|
11
12
|
createTask: () => createTask,
|
|
12
13
|
createTaskStory: () => createTaskStory,
|
|
13
14
|
cursor: () => cursor,
|
|
@@ -125,7 +126,8 @@ import {
|
|
|
125
126
|
http,
|
|
126
127
|
lastReferenceValue,
|
|
127
128
|
merge,
|
|
128
|
-
sourceValue
|
|
129
|
+
sourceValue,
|
|
130
|
+
as
|
|
129
131
|
} from "@openfn/language-common";
|
|
130
132
|
function execute(...operations) {
|
|
131
133
|
const initialState = {
|
|
@@ -274,6 +276,7 @@ function request2(path, params = {}, callback) {
|
|
|
274
276
|
var src_default = Adaptor_exports;
|
|
275
277
|
export {
|
|
276
278
|
alterState,
|
|
279
|
+
as,
|
|
277
280
|
createTask,
|
|
278
281
|
createTaskStory,
|
|
279
282
|
cursor,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openfn/language-asana",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.2.0",
|
|
4
4
|
"label": "Asana",
|
|
5
5
|
"description": "An adaptor to access objects in Asana",
|
|
6
6
|
"homepage": "https://docs.openfn.org",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"configuration-schema.json"
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@openfn/language-common": "
|
|
28
|
+
"@openfn/language-common": "3.0.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"assertion-error": "2.0.0",
|
package/types/Adaptor.d.ts
CHANGED
|
@@ -175,4 +175,4 @@ export type StoryOptions = any;
|
|
|
175
175
|
* Options provided to the Asana API request
|
|
176
176
|
*/
|
|
177
177
|
export type RequestOptions = any;
|
|
178
|
-
export { alterState, cursor, dataPath, dataValue, dateFns, each, field, fields, fn, fnIf, http, lastReferenceValue, merge, sourceValue } from "@openfn/language-common";
|
|
178
|
+
export { alterState, cursor, dataPath, dataValue, dateFns, each, field, fields, fn, fnIf, http, lastReferenceValue, merge, sourceValue, as } from "@openfn/language-common";
|