@openfn/language-godata 3.5.18 → 3.6.1
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 +92 -0
- package/dist/index.cjs +6 -0
- package/dist/index.js +8 -2
- package/package.json +3 -3
- package/types/Adaptor.d.ts +1 -1
package/ast.json
CHANGED
|
@@ -1180,6 +1180,49 @@
|
|
|
1180
1180
|
},
|
|
1181
1181
|
"valid": true
|
|
1182
1182
|
},
|
|
1183
|
+
{
|
|
1184
|
+
"name": "combine",
|
|
1185
|
+
"params": [
|
|
1186
|
+
"operations"
|
|
1187
|
+
],
|
|
1188
|
+
"docs": {
|
|
1189
|
+
"description": "Combines two operations into one",
|
|
1190
|
+
"tags": [
|
|
1191
|
+
{
|
|
1192
|
+
"title": "public",
|
|
1193
|
+
"description": null,
|
|
1194
|
+
"type": null
|
|
1195
|
+
},
|
|
1196
|
+
{
|
|
1197
|
+
"title": "function",
|
|
1198
|
+
"description": null,
|
|
1199
|
+
"name": null
|
|
1200
|
+
},
|
|
1201
|
+
{
|
|
1202
|
+
"title": "example",
|
|
1203
|
+
"description": "combine(\n create('foo'),\n delete('bar')\n)"
|
|
1204
|
+
},
|
|
1205
|
+
{
|
|
1206
|
+
"title": "param",
|
|
1207
|
+
"description": "Operations to be performed.",
|
|
1208
|
+
"type": {
|
|
1209
|
+
"type": "NameExpression",
|
|
1210
|
+
"name": "Operations"
|
|
1211
|
+
},
|
|
1212
|
+
"name": "operations"
|
|
1213
|
+
},
|
|
1214
|
+
{
|
|
1215
|
+
"title": "returns",
|
|
1216
|
+
"description": null,
|
|
1217
|
+
"type": {
|
|
1218
|
+
"type": "NameExpression",
|
|
1219
|
+
"name": "Operation"
|
|
1220
|
+
}
|
|
1221
|
+
}
|
|
1222
|
+
]
|
|
1223
|
+
},
|
|
1224
|
+
"valid": true
|
|
1225
|
+
},
|
|
1183
1226
|
{
|
|
1184
1227
|
"name": "field",
|
|
1185
1228
|
"params": [
|
|
@@ -1333,6 +1376,55 @@
|
|
|
1333
1376
|
]
|
|
1334
1377
|
},
|
|
1335
1378
|
"valid": true
|
|
1379
|
+
},
|
|
1380
|
+
{
|
|
1381
|
+
"name": "log",
|
|
1382
|
+
"params": [
|
|
1383
|
+
"args"
|
|
1384
|
+
],
|
|
1385
|
+
"docs": {
|
|
1386
|
+
"description": "Outputs a message, like calling `console.log`. Use this at the top level of your job code, but not inside callbacks.",
|
|
1387
|
+
"tags": [
|
|
1388
|
+
{
|
|
1389
|
+
"title": "public",
|
|
1390
|
+
"description": null,
|
|
1391
|
+
"type": null
|
|
1392
|
+
},
|
|
1393
|
+
{
|
|
1394
|
+
"title": "function",
|
|
1395
|
+
"description": null,
|
|
1396
|
+
"name": null
|
|
1397
|
+
},
|
|
1398
|
+
{
|
|
1399
|
+
"title": "example",
|
|
1400
|
+
"description": "log('Patient List::', $.patients);",
|
|
1401
|
+
"caption": "Log values from state"
|
|
1402
|
+
},
|
|
1403
|
+
{
|
|
1404
|
+
"title": "example",
|
|
1405
|
+
"description": "fn((state) => {\n console.log(state.data);\n return state;\n})",
|
|
1406
|
+
"caption": "Use console.log inside a callback or fn block"
|
|
1407
|
+
},
|
|
1408
|
+
{
|
|
1409
|
+
"title": "param",
|
|
1410
|
+
"description": "A value or message to display in the logs",
|
|
1411
|
+
"type": {
|
|
1412
|
+
"type": "NameExpression",
|
|
1413
|
+
"name": "any"
|
|
1414
|
+
},
|
|
1415
|
+
"name": "args"
|
|
1416
|
+
},
|
|
1417
|
+
{
|
|
1418
|
+
"title": "returns",
|
|
1419
|
+
"description": null,
|
|
1420
|
+
"type": {
|
|
1421
|
+
"type": "NameExpression",
|
|
1422
|
+
"name": "Operation"
|
|
1423
|
+
}
|
|
1424
|
+
}
|
|
1425
|
+
]
|
|
1426
|
+
},
|
|
1427
|
+
"valid": true
|
|
1336
1428
|
}
|
|
1337
1429
|
]
|
|
1338
1430
|
}
|
package/dist/index.cjs
CHANGED
|
@@ -27,6 +27,7 @@ var src_exports = {};
|
|
|
27
27
|
__export(src_exports, {
|
|
28
28
|
alterState: () => import_language_common2.alterState,
|
|
29
29
|
axios: () => import_axios.default,
|
|
30
|
+
combine: () => import_language_common2.combine,
|
|
30
31
|
dataPath: () => import_language_common2.dataPath,
|
|
31
32
|
dataValue: () => import_language_common2.dataValue,
|
|
32
33
|
default: () => src_default,
|
|
@@ -47,6 +48,7 @@ __export(src_exports, {
|
|
|
47
48
|
listLocations: () => listLocations,
|
|
48
49
|
listOutbreaks: () => listOutbreaks,
|
|
49
50
|
listReferenceData: () => listReferenceData,
|
|
51
|
+
log: () => import_language_common2.log,
|
|
50
52
|
merge: () => import_language_common2.merge,
|
|
51
53
|
sourceValue: () => import_language_common2.sourceValue,
|
|
52
54
|
upsertCase: () => upsertCase,
|
|
@@ -62,6 +64,7 @@ var Adaptor_exports = {};
|
|
|
62
64
|
__export(Adaptor_exports, {
|
|
63
65
|
alterState: () => import_language_common2.alterState,
|
|
64
66
|
axios: () => import_axios.default,
|
|
67
|
+
combine: () => import_language_common2.combine,
|
|
65
68
|
dataPath: () => import_language_common2.dataPath,
|
|
66
69
|
dataValue: () => import_language_common2.dataValue,
|
|
67
70
|
each: () => import_language_common2.each,
|
|
@@ -81,6 +84,7 @@ __export(Adaptor_exports, {
|
|
|
81
84
|
listLocations: () => listLocations,
|
|
82
85
|
listOutbreaks: () => listOutbreaks,
|
|
83
86
|
listReferenceData: () => listReferenceData,
|
|
87
|
+
log: () => import_language_common2.log,
|
|
84
88
|
merge: () => import_language_common2.merge,
|
|
85
89
|
sourceValue: () => import_language_common2.sourceValue,
|
|
86
90
|
upsertCase: () => upsertCase,
|
|
@@ -657,6 +661,7 @@ var src_default = Adaptor_exports;
|
|
|
657
661
|
0 && (module.exports = {
|
|
658
662
|
alterState,
|
|
659
663
|
axios,
|
|
664
|
+
combine,
|
|
660
665
|
dataPath,
|
|
661
666
|
dataValue,
|
|
662
667
|
each,
|
|
@@ -676,6 +681,7 @@ var src_default = Adaptor_exports;
|
|
|
676
681
|
listLocations,
|
|
677
682
|
listOutbreaks,
|
|
678
683
|
listReferenceData,
|
|
684
|
+
log,
|
|
679
685
|
merge,
|
|
680
686
|
sourceValue,
|
|
681
687
|
upsertCase,
|
package/dist/index.js
CHANGED
|
@@ -9,6 +9,7 @@ var Adaptor_exports = {};
|
|
|
9
9
|
__export(Adaptor_exports, {
|
|
10
10
|
alterState: () => alterState,
|
|
11
11
|
axios: () => axios,
|
|
12
|
+
combine: () => combine,
|
|
12
13
|
dataPath: () => dataPath,
|
|
13
14
|
dataValue: () => dataValue,
|
|
14
15
|
each: () => each,
|
|
@@ -28,6 +29,7 @@ __export(Adaptor_exports, {
|
|
|
28
29
|
listLocations: () => listLocations,
|
|
29
30
|
listOutbreaks: () => listOutbreaks,
|
|
30
31
|
listReferenceData: () => listReferenceData,
|
|
32
|
+
log: () => log,
|
|
31
33
|
merge: () => merge,
|
|
32
34
|
sourceValue: () => sourceValue,
|
|
33
35
|
upsertCase: () => upsertCase,
|
|
@@ -43,15 +45,17 @@ import {
|
|
|
43
45
|
import { expandReferences } from "@openfn/language-common/util";
|
|
44
46
|
import axios from "axios";
|
|
45
47
|
import {
|
|
46
|
-
fn,
|
|
47
|
-
fnIf,
|
|
48
48
|
alterState,
|
|
49
|
+
combine,
|
|
49
50
|
dataPath,
|
|
50
51
|
dataValue,
|
|
51
52
|
each,
|
|
52
53
|
field,
|
|
53
54
|
fields,
|
|
55
|
+
fn,
|
|
56
|
+
fnIf,
|
|
54
57
|
lastReferenceValue,
|
|
58
|
+
log,
|
|
55
59
|
merge,
|
|
56
60
|
sourceValue
|
|
57
61
|
} from "@openfn/language-common";
|
|
@@ -618,6 +622,7 @@ var src_default = Adaptor_exports;
|
|
|
618
622
|
export {
|
|
619
623
|
alterState,
|
|
620
624
|
axios,
|
|
625
|
+
combine,
|
|
621
626
|
dataPath,
|
|
622
627
|
dataValue,
|
|
623
628
|
src_default as default,
|
|
@@ -638,6 +643,7 @@ export {
|
|
|
638
643
|
listLocations,
|
|
639
644
|
listOutbreaks,
|
|
640
645
|
listReferenceData,
|
|
646
|
+
log,
|
|
641
647
|
merge,
|
|
642
648
|
sourceValue,
|
|
643
649
|
upsertCase,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openfn/language-godata",
|
|
3
3
|
"label": "GoData",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.6.1",
|
|
5
5
|
"description": "An OpenFn adaptor for use with the WHO's GoData API",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
7
7
|
"author": "Open Function Group",
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
"configuration-schema.json"
|
|
14
14
|
],
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"axios": "^1.
|
|
17
|
-
"@openfn/language-common": "3.3.
|
|
16
|
+
"axios": "^1.15.2",
|
|
17
|
+
"@openfn/language-common": "3.3.3"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"assertion-error": "^1.0.1",
|
package/types/Adaptor.d.ts
CHANGED
|
@@ -235,4 +235,4 @@ export function getReferenceData(query: object, callback: Function): Operation;
|
|
|
235
235
|
export function upsertReferenceData(externalId: string, goDataReferenceData: object, callback: Function): Operation;
|
|
236
236
|
export { axios };
|
|
237
237
|
import axios from "axios";
|
|
238
|
-
export {
|
|
238
|
+
export { alterState, combine, dataPath, dataValue, each, field, fields, fn, fnIf, lastReferenceValue, log, merge, sourceValue } from "@openfn/language-common";
|