@openfn/language-kobotoolbox 4.2.13 → 4.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 CHANGED
@@ -563,6 +563,49 @@
563
563
  },
564
564
  "valid": true
565
565
  },
566
+ {
567
+ "name": "combine",
568
+ "params": [
569
+ "operations"
570
+ ],
571
+ "docs": {
572
+ "description": "Combines two operations into one",
573
+ "tags": [
574
+ {
575
+ "title": "public",
576
+ "description": null,
577
+ "type": null
578
+ },
579
+ {
580
+ "title": "function",
581
+ "description": null,
582
+ "name": null
583
+ },
584
+ {
585
+ "title": "example",
586
+ "description": "combine(\n create('foo'),\n delete('bar')\n)"
587
+ },
588
+ {
589
+ "title": "param",
590
+ "description": "Operations to be performed.",
591
+ "type": {
592
+ "type": "NameExpression",
593
+ "name": "Operations"
594
+ },
595
+ "name": "operations"
596
+ },
597
+ {
598
+ "title": "returns",
599
+ "description": null,
600
+ "type": {
601
+ "type": "NameExpression",
602
+ "name": "Operation"
603
+ }
604
+ }
605
+ ]
606
+ },
607
+ "valid": true
608
+ },
566
609
  {
567
610
  "name": "field",
568
611
  "params": [
@@ -880,6 +923,55 @@
880
923
  },
881
924
  "valid": false
882
925
  },
926
+ {
927
+ "name": "log",
928
+ "params": [
929
+ "args"
930
+ ],
931
+ "docs": {
932
+ "description": "Outputs a message, like calling `console.log`. Use this at the top level of your job code, but not inside callbacks.",
933
+ "tags": [
934
+ {
935
+ "title": "public",
936
+ "description": null,
937
+ "type": null
938
+ },
939
+ {
940
+ "title": "function",
941
+ "description": null,
942
+ "name": null
943
+ },
944
+ {
945
+ "title": "example",
946
+ "description": "log('Patient List::', $.patients);",
947
+ "caption": "Log values from state"
948
+ },
949
+ {
950
+ "title": "example",
951
+ "description": "fn((state) => {\n console.log(state.data);\n return state;\n})",
952
+ "caption": "Use console.log inside a callback or fn block"
953
+ },
954
+ {
955
+ "title": "param",
956
+ "description": "A value or message to display in the logs",
957
+ "type": {
958
+ "type": "NameExpression",
959
+ "name": "any"
960
+ },
961
+ "name": "args"
962
+ },
963
+ {
964
+ "title": "returns",
965
+ "description": null,
966
+ "type": {
967
+ "type": "NameExpression",
968
+ "name": "Operation"
969
+ }
970
+ }
971
+ ]
972
+ },
973
+ "valid": true
974
+ },
883
975
  {
884
976
  "name": "as",
885
977
  "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
  cursor: () => import_language_common3.cursor,
25
26
  dataPath: () => import_language_common3.dataPath,
26
27
  dataValue: () => import_language_common3.dataValue,
@@ -37,6 +38,7 @@ __export(src_exports, {
37
38
  group: () => import_language_common3.group,
38
39
  http: () => http_exports,
39
40
  lastReferenceValue: () => import_language_common3.lastReferenceValue,
41
+ log: () => import_language_common3.log,
40
42
  map: () => import_language_common3.map,
41
43
  merge: () => import_language_common3.merge,
42
44
  sourceValue: () => import_language_common3.sourceValue
@@ -48,6 +50,7 @@ var Adaptor_exports = {};
48
50
  __export(Adaptor_exports, {
49
51
  alterState: () => import_language_common3.alterState,
50
52
  as: () => import_language_common3.as,
53
+ combine: () => import_language_common3.combine,
51
54
  cursor: () => import_language_common3.cursor,
52
55
  dataPath: () => import_language_common3.dataPath,
53
56
  dataValue: () => import_language_common3.dataValue,
@@ -62,6 +65,7 @@ __export(Adaptor_exports, {
62
65
  getSubmissions: () => getSubmissions,
63
66
  group: () => import_language_common3.group,
64
67
  lastReferenceValue: () => import_language_common3.lastReferenceValue,
68
+ log: () => import_language_common3.log,
65
69
  map: () => import_language_common3.map,
66
70
  merge: () => import_language_common3.merge,
67
71
  sourceValue: () => import_language_common3.sourceValue
@@ -310,6 +314,7 @@ var src_default = Adaptor_exports;
310
314
  0 && (module.exports = {
311
315
  alterState,
312
316
  as,
317
+ combine,
313
318
  cursor,
314
319
  dataPath,
315
320
  dataValue,
@@ -325,6 +330,7 @@ var src_default = Adaptor_exports;
325
330
  group,
326
331
  http,
327
332
  lastReferenceValue,
333
+ log,
328
334
  map,
329
335
  merge,
330
336
  sourceValue
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
  cursor: () => cursor,
13
14
  dataPath: () => dataPath,
14
15
  dataValue: () => dataValue,
@@ -23,6 +24,7 @@ __export(Adaptor_exports, {
23
24
  getSubmissions: () => getSubmissions,
24
25
  group: () => group,
25
26
  lastReferenceValue: () => lastReferenceValue,
27
+ log: () => log,
26
28
  map: () => map,
27
29
  merge: () => merge,
28
30
  sourceValue: () => sourceValue
@@ -131,6 +133,7 @@ function maybeStringify(query) {
131
133
  import {
132
134
  alterState,
133
135
  as,
136
+ combine,
134
137
  cursor,
135
138
  dataPath,
136
139
  dataValue,
@@ -141,6 +144,7 @@ import {
141
144
  fnIf,
142
145
  group,
143
146
  lastReferenceValue,
147
+ log,
144
148
  map,
145
149
  merge,
146
150
  sourceValue
@@ -293,6 +297,7 @@ var src_default = Adaptor_exports;
293
297
  export {
294
298
  alterState,
295
299
  as,
300
+ combine,
296
301
  cursor,
297
302
  dataPath,
298
303
  dataValue,
@@ -309,6 +314,7 @@ export {
309
314
  group,
310
315
  http_exports as http,
311
316
  lastReferenceValue,
317
+ log,
312
318
  map,
313
319
  merge,
314
320
  sourceValue
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@openfn/language-kobotoolbox",
3
3
  "label": "KoboToolbox",
4
- "version": "4.2.13",
4
+ "version": "4.3.0",
5
5
  "description": "OpenFn adaptor for KoboToolbox",
6
6
  "homepage": "https://docs.openfn.org",
7
7
  "repository": {
@@ -18,7 +18,7 @@
18
18
  "configuration-schema.json"
19
19
  ],
20
20
  "dependencies": {
21
- "@openfn/language-common": "3.3.1"
21
+ "@openfn/language-common": "3.3.2"
22
22
  },
23
23
  "devDependencies": {
24
24
  "assertion-error": "^1.0.1",
@@ -63,4 +63,4 @@ export function getSubmissions(formId: string, options?: {
63
63
  * @returns {Operation}
64
64
  */
65
65
  export function getDeploymentInfo(formId: string): Operation;
66
- export { alterState, as, cursor, dataPath, dataValue, each, field, fields, fn, fnIf, group, lastReferenceValue, map, merge, sourceValue } from "@openfn/language-common";
66
+ export { alterState, as, combine, cursor, dataPath, dataValue, each, field, fields, fn, fnIf, group, lastReferenceValue, log, map, merge, sourceValue } from "@openfn/language-common";