@openfn/language-asana 5.0.12 → 5.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
@@ -944,6 +944,49 @@
944
944
  },
945
945
  "valid": true
946
946
  },
947
+ {
948
+ "name": "combine",
949
+ "params": [
950
+ "operations"
951
+ ],
952
+ "docs": {
953
+ "description": "Combines two operations into one",
954
+ "tags": [
955
+ {
956
+ "title": "public",
957
+ "description": null,
958
+ "type": null
959
+ },
960
+ {
961
+ "title": "function",
962
+ "description": null,
963
+ "name": null
964
+ },
965
+ {
966
+ "title": "example",
967
+ "description": "combine(\n create('foo'),\n delete('bar')\n)"
968
+ },
969
+ {
970
+ "title": "param",
971
+ "description": "Operations to be performed.",
972
+ "type": {
973
+ "type": "NameExpression",
974
+ "name": "Operations"
975
+ },
976
+ "name": "operations"
977
+ },
978
+ {
979
+ "title": "returns",
980
+ "description": null,
981
+ "type": {
982
+ "type": "NameExpression",
983
+ "name": "Operation"
984
+ }
985
+ }
986
+ ]
987
+ },
988
+ "valid": true
989
+ },
947
990
  {
948
991
  "name": "field",
949
992
  "params": [
@@ -1184,6 +1227,55 @@
1184
1227
  },
1185
1228
  "valid": false
1186
1229
  },
1230
+ {
1231
+ "name": "log",
1232
+ "params": [
1233
+ "args"
1234
+ ],
1235
+ "docs": {
1236
+ "description": "Outputs a message, like calling `console.log`. Use this at the top level of your job code, but not inside callbacks.",
1237
+ "tags": [
1238
+ {
1239
+ "title": "public",
1240
+ "description": null,
1241
+ "type": null
1242
+ },
1243
+ {
1244
+ "title": "function",
1245
+ "description": null,
1246
+ "name": null
1247
+ },
1248
+ {
1249
+ "title": "example",
1250
+ "description": "log('Patient List::', $.patients);",
1251
+ "caption": "Log values from state"
1252
+ },
1253
+ {
1254
+ "title": "example",
1255
+ "description": "fn((state) => {\n console.log(state.data);\n return state;\n})",
1256
+ "caption": "Use console.log inside a callback or fn block"
1257
+ },
1258
+ {
1259
+ "title": "param",
1260
+ "description": "A value or message to display in the logs",
1261
+ "type": {
1262
+ "type": "NameExpression",
1263
+ "name": "any"
1264
+ },
1265
+ "name": "args"
1266
+ },
1267
+ {
1268
+ "title": "returns",
1269
+ "description": null,
1270
+ "type": {
1271
+ "type": "NameExpression",
1272
+ "name": "Operation"
1273
+ }
1274
+ }
1275
+ ]
1276
+ },
1277
+ "valid": true
1278
+ },
1187
1279
  {
1188
1280
  "name": "as",
1189
1281
  "params": [
package/dist/index.cjs CHANGED
@@ -21,6 +21,7 @@ var src_exports = {};
21
21
  __export(src_exports, {
22
22
  alterState: () => import_language_common3.alterState,
23
23
  as: () => import_language_common3.as,
24
+ combine: () => import_language_common3.combine,
24
25
  createTask: () => createTask,
25
26
  createTaskStory: () => createTaskStory,
26
27
  cursor: () => import_language_common3.cursor,
@@ -37,6 +38,7 @@ __export(src_exports, {
37
38
  getTask: () => getTask,
38
39
  getTasks: () => getTasks,
39
40
  lastReferenceValue: () => import_language_common3.lastReferenceValue,
41
+ log: () => import_language_common3.log,
40
42
  merge: () => import_language_common3.merge,
41
43
  request: () => request2,
42
44
  searchTask: () => searchTask,
@@ -51,6 +53,7 @@ var Adaptor_exports = {};
51
53
  __export(Adaptor_exports, {
52
54
  alterState: () => import_language_common3.alterState,
53
55
  as: () => import_language_common3.as,
56
+ combine: () => import_language_common3.combine,
54
57
  createTask: () => createTask,
55
58
  createTaskStory: () => createTaskStory,
56
59
  cursor: () => import_language_common3.cursor,
@@ -66,6 +69,7 @@ __export(Adaptor_exports, {
66
69
  getTask: () => getTask,
67
70
  getTasks: () => getTasks,
68
71
  lastReferenceValue: () => import_language_common3.lastReferenceValue,
72
+ log: () => import_language_common3.log,
69
73
  merge: () => import_language_common3.merge,
70
74
  request: () => request2,
71
75
  searchTask: () => searchTask,
@@ -323,6 +327,7 @@ var src_default = Adaptor_exports;
323
327
  0 && (module.exports = {
324
328
  alterState,
325
329
  as,
330
+ combine,
326
331
  createTask,
327
332
  createTaskStory,
328
333
  cursor,
@@ -338,6 +343,7 @@ var src_default = Adaptor_exports;
338
343
  getTask,
339
344
  getTasks,
340
345
  lastReferenceValue,
346
+ log,
341
347
  merge,
342
348
  request,
343
349
  searchTask,
package/dist/index.js CHANGED
@@ -9,6 +9,7 @@ var Adaptor_exports = {};
9
9
  __export(Adaptor_exports, {
10
10
  alterState: () => alterState,
11
11
  as: () => as,
12
+ combine: () => combine,
12
13
  createTask: () => createTask,
13
14
  createTaskStory: () => createTaskStory,
14
15
  cursor: () => cursor,
@@ -24,6 +25,7 @@ __export(Adaptor_exports, {
24
25
  getTask: () => getTask,
25
26
  getTasks: () => getTasks,
26
27
  lastReferenceValue: () => lastReferenceValue,
28
+ log: () => log,
27
29
  merge: () => merge,
28
30
  request: () => request2,
29
31
  searchTask: () => searchTask,
@@ -114,6 +116,8 @@ function prepareNextState(state, response) {
114
116
  // src/Adaptor.js
115
117
  import {
116
118
  alterState,
119
+ as,
120
+ combine,
117
121
  cursor,
118
122
  dataPath,
119
123
  dataValue,
@@ -124,9 +128,9 @@ import {
124
128
  fn,
125
129
  fnIf,
126
130
  lastReferenceValue,
131
+ log,
127
132
  merge,
128
- sourceValue,
129
- as
133
+ sourceValue
130
134
  } from "@openfn/language-common";
131
135
  function execute(...operations) {
132
136
  const initialState = {
@@ -302,6 +306,7 @@ var src_default = Adaptor_exports;
302
306
  export {
303
307
  alterState,
304
308
  as,
309
+ combine,
305
310
  createTask,
306
311
  createTaskStory,
307
312
  cursor,
@@ -318,6 +323,7 @@ export {
318
323
  getTask,
319
324
  getTasks,
320
325
  lastReferenceValue,
326
+ log,
321
327
  merge,
322
328
  request2 as request,
323
329
  searchTask,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfn/language-asana",
3
- "version": "5.0.12",
3
+ "version": "5.1.0",
4
4
  "label": "Asana",
5
5
  "description": "OpenFn adaptor for accessing 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": "3.3.1"
28
+ "@openfn/language-common": "3.3.2"
29
29
  },
30
30
  "devDependencies": {
31
31
  "assertion-error": "2.0.0",
@@ -207,4 +207,4 @@ export type StoryOptions = any;
207
207
  * Options provided to the Asana API request
208
208
  */
209
209
  export type RequestOptions = any;
210
- export { alterState, cursor, dataPath, dataValue, dateFns, each, field, fields, fn, fnIf, lastReferenceValue, merge, sourceValue, as } from "@openfn/language-common";
210
+ export { alterState, as, combine, cursor, dataPath, dataValue, dateFns, each, field, fields, fn, fnIf, lastReferenceValue, log, merge, sourceValue } from "@openfn/language-common";