@openfn/language-asana 3.2.0 → 3.3.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 +63 -1
- package/dist/index.cjs +3 -0
- package/dist/index.js +3 -0
- package/package.json +2 -2
- package/types/Adaptor.d.ts +1 -1
package/ast.json
CHANGED
|
@@ -351,6 +351,59 @@
|
|
|
351
351
|
},
|
|
352
352
|
"valid": true
|
|
353
353
|
},
|
|
354
|
+
{
|
|
355
|
+
"name": "fnIf",
|
|
356
|
+
"params": [
|
|
357
|
+
"condition",
|
|
358
|
+
"operation"
|
|
359
|
+
],
|
|
360
|
+
"docs": {
|
|
361
|
+
"description": "A custom operation that will only execute the function if the condition returns true",
|
|
362
|
+
"tags": [
|
|
363
|
+
{
|
|
364
|
+
"title": "public",
|
|
365
|
+
"description": null,
|
|
366
|
+
"type": null
|
|
367
|
+
},
|
|
368
|
+
{
|
|
369
|
+
"title": "example",
|
|
370
|
+
"description": "fnIf((state) => state?.data?.name, get(\"https://example.com\"));"
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
"title": "function",
|
|
374
|
+
"description": null,
|
|
375
|
+
"name": null
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
"title": "param",
|
|
379
|
+
"description": "The condition that returns true",
|
|
380
|
+
"type": {
|
|
381
|
+
"type": "NameExpression",
|
|
382
|
+
"name": "Boolean"
|
|
383
|
+
},
|
|
384
|
+
"name": "condition"
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
"title": "param",
|
|
388
|
+
"description": "The operation needed to be executed.",
|
|
389
|
+
"type": {
|
|
390
|
+
"type": "NameExpression",
|
|
391
|
+
"name": "Operation"
|
|
392
|
+
},
|
|
393
|
+
"name": "operation"
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
"title": "returns",
|
|
397
|
+
"description": null,
|
|
398
|
+
"type": {
|
|
399
|
+
"type": "NameExpression",
|
|
400
|
+
"name": "Operation"
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
]
|
|
404
|
+
},
|
|
405
|
+
"valid": true
|
|
406
|
+
},
|
|
354
407
|
{
|
|
355
408
|
"name": "sourceValue",
|
|
356
409
|
"params": [
|
|
@@ -732,7 +785,7 @@
|
|
|
732
785
|
"options"
|
|
733
786
|
],
|
|
734
787
|
"docs": {
|
|
735
|
-
"description": "Sets a cursor property on state.\nSupports natural language dates like `now`, `today`, `yesterday`, `n hours ago`, `n days ago`, and `start`,\nwhich will be converted relative to the environment (ie, the Lightning or CLI locale). Custom timezones
|
|
788
|
+
"description": "Sets a cursor property on state.\nSupports natural language dates like `now`, `today`, `yesterday`, `n hours ago`, `n days ago`, and `start`,\nwhich will be converted relative to the environment (ie, the Lightning or CLI locale). Custom timezones\nare not yet supported.\nYou can provide a formatter to customise the final cursor value, which is useful for normalising\ndifferent inputs. The custom formatter runs after natural language date conversion.\nSee the usage guide at {@link https://docs.openfn.org/documentation/jobs/job-writing-guide#using-cursors}",
|
|
736
789
|
"tags": [
|
|
737
790
|
{
|
|
738
791
|
"title": "public",
|
|
@@ -790,6 +843,15 @@
|
|
|
790
843
|
},
|
|
791
844
|
"name": "options.defaultValue"
|
|
792
845
|
},
|
|
846
|
+
{
|
|
847
|
+
"title": "param",
|
|
848
|
+
"description": "custom formatter for the final cursor value",
|
|
849
|
+
"type": {
|
|
850
|
+
"type": "NameExpression",
|
|
851
|
+
"name": "Function"
|
|
852
|
+
},
|
|
853
|
+
"name": "options.format"
|
|
854
|
+
},
|
|
793
855
|
{
|
|
794
856
|
"title": "returns",
|
|
795
857
|
"description": null,
|
package/dist/index.cjs
CHANGED
|
@@ -32,6 +32,7 @@ __export(src_exports, {
|
|
|
32
32
|
field: () => import_language_common3.field,
|
|
33
33
|
fields: () => import_language_common3.fields,
|
|
34
34
|
fn: () => import_language_common3.fn,
|
|
35
|
+
fnIf: () => import_language_common3.fnIf,
|
|
35
36
|
getTask: () => getTask,
|
|
36
37
|
getTasks: () => getTasks,
|
|
37
38
|
http: () => import_language_common3.http,
|
|
@@ -59,6 +60,7 @@ __export(Adaptor_exports, {
|
|
|
59
60
|
field: () => import_language_common3.field,
|
|
60
61
|
fields: () => import_language_common3.fields,
|
|
61
62
|
fn: () => import_language_common3.fn,
|
|
63
|
+
fnIf: () => import_language_common3.fnIf,
|
|
62
64
|
getTask: () => getTask,
|
|
63
65
|
getTasks: () => getTasks,
|
|
64
66
|
http: () => import_language_common3.http,
|
|
@@ -258,6 +260,7 @@ var src_default = Adaptor_exports;
|
|
|
258
260
|
field,
|
|
259
261
|
fields,
|
|
260
262
|
fn,
|
|
263
|
+
fnIf,
|
|
261
264
|
getTask,
|
|
262
265
|
getTasks,
|
|
263
266
|
http,
|
package/dist/index.js
CHANGED
|
@@ -19,6 +19,7 @@ __export(Adaptor_exports, {
|
|
|
19
19
|
field: () => field,
|
|
20
20
|
fields: () => fields,
|
|
21
21
|
fn: () => fn,
|
|
22
|
+
fnIf: () => fnIf,
|
|
22
23
|
getTask: () => getTask,
|
|
23
24
|
getTasks: () => getTasks,
|
|
24
25
|
http: () => http,
|
|
@@ -80,6 +81,7 @@ import {
|
|
|
80
81
|
field,
|
|
81
82
|
fields,
|
|
82
83
|
fn,
|
|
84
|
+
fnIf,
|
|
83
85
|
http,
|
|
84
86
|
lastReferenceValue,
|
|
85
87
|
merge,
|
|
@@ -235,6 +237,7 @@ export {
|
|
|
235
237
|
field,
|
|
236
238
|
fields,
|
|
237
239
|
fn,
|
|
240
|
+
fnIf,
|
|
238
241
|
getTask,
|
|
239
242
|
getTasks,
|
|
240
243
|
http,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openfn/language-asana",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.0",
|
|
4
4
|
"description": "An adaptor to access objects in Asana",
|
|
5
5
|
"homepage": "https://docs.openfn.org",
|
|
6
6
|
"repository": {
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"configuration-schema.json"
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@openfn/language-common": "^1.
|
|
26
|
+
"@openfn/language-common": "^1.14.0"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@openfn/simple-ast": "0.4.1",
|
package/types/Adaptor.d.ts
CHANGED
|
@@ -187,4 +187,4 @@ export type RequestOptions = {
|
|
|
187
187
|
*/
|
|
188
188
|
method: string;
|
|
189
189
|
};
|
|
190
|
-
export { alterState, cursor, dataPath, dataValue, dateFns, each, field, fields, fn, http, lastReferenceValue, merge, sourceValue } from "@openfn/language-common";
|
|
190
|
+
export { alterState, cursor, dataPath, dataValue, dateFns, each, field, fields, fn, fnIf, http, lastReferenceValue, merge, sourceValue } from "@openfn/language-common";
|