@openfn/language-kobotoolbox 1.1.1 → 1.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 CHANGED
@@ -56,6 +56,49 @@
56
56
  ],
57
57
  "exports": [],
58
58
  "common": [
59
+ {
60
+ "name": "fn",
61
+ "params": [
62
+ "func"
63
+ ],
64
+ "docs": {
65
+ "description": "Creates a custom step (or operation) for more flexible job writing.",
66
+ "tags": [
67
+ {
68
+ "title": "public",
69
+ "description": null,
70
+ "type": null
71
+ },
72
+ {
73
+ "title": "example",
74
+ "description": "fn(state => {\n // do some things to state\n return state;\n});"
75
+ },
76
+ {
77
+ "title": "function",
78
+ "description": null,
79
+ "name": null
80
+ },
81
+ {
82
+ "title": "param",
83
+ "description": "is the function",
84
+ "type": {
85
+ "type": "NameExpression",
86
+ "name": "Function"
87
+ },
88
+ "name": "func"
89
+ },
90
+ {
91
+ "title": "returns",
92
+ "description": null,
93
+ "type": {
94
+ "type": "NameExpression",
95
+ "name": "Operation"
96
+ }
97
+ }
98
+ ]
99
+ },
100
+ "valid": true
101
+ },
59
102
  {
60
103
  "name": "sourceValue",
61
104
  "params": [
package/dist/index.cjs CHANGED
@@ -19,8 +19,21 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
19
19
  // src/index.js
20
20
  var src_exports = {};
21
21
  __export(src_exports, {
22
- Adaptor: () => Adaptor_exports,
23
- default: () => src_default
22
+ alterState: () => import_language_common2.alterState,
23
+ dataPath: () => import_language_common2.dataPath,
24
+ dataValue: () => import_language_common2.dataValue,
25
+ default: () => src_default,
26
+ each: () => import_language_common2.each,
27
+ execute: () => execute,
28
+ field: () => import_language_common2.field,
29
+ fields: () => import_language_common2.fields,
30
+ fn: () => import_language_common2.fn,
31
+ getForms: () => getForms,
32
+ getSubmissions: () => getSubmissions,
33
+ http: () => import_language_common2.http,
34
+ lastReferenceValue: () => import_language_common2.lastReferenceValue,
35
+ merge: () => import_language_common2.merge,
36
+ sourceValue: () => import_language_common2.sourceValue
24
37
  });
25
38
  module.exports = __toCommonJS(src_exports);
26
39
 
@@ -34,6 +47,7 @@ __export(Adaptor_exports, {
34
47
  execute: () => execute,
35
48
  field: () => import_language_common2.field,
36
49
  fields: () => import_language_common2.fields,
50
+ fn: () => import_language_common2.fn,
37
51
  getForms: () => getForms,
38
52
  getSubmissions: () => getSubmissions,
39
53
  http: () => import_language_common2.http,
@@ -101,5 +115,18 @@ function getSubmissions(params, callback) {
101
115
  var src_default = Adaptor_exports;
102
116
  // Annotate the CommonJS export names for ESM import in node:
103
117
  0 && (module.exports = {
104
- Adaptor
118
+ alterState,
119
+ dataPath,
120
+ dataValue,
121
+ each,
122
+ execute,
123
+ field,
124
+ fields,
125
+ fn,
126
+ getForms,
127
+ getSubmissions,
128
+ http,
129
+ lastReferenceValue,
130
+ merge,
131
+ sourceValue
105
132
  });
package/dist/index.js CHANGED
@@ -14,6 +14,7 @@ __export(Adaptor_exports, {
14
14
  execute: () => execute,
15
15
  field: () => field,
16
16
  fields: () => fields,
17
+ fn: () => fn,
17
18
  getForms: () => getForms,
18
19
  getSubmissions: () => getSubmissions,
19
20
  http: () => http2,
@@ -28,6 +29,7 @@ import {
28
29
  http
29
30
  } from "@openfn/language-common";
30
31
  import {
32
+ fn,
31
33
  alterState,
32
34
  dataPath,
33
35
  dataValue,
@@ -96,6 +98,19 @@ function getSubmissions(params, callback) {
96
98
  // src/index.js
97
99
  var src_default = Adaptor_exports;
98
100
  export {
99
- Adaptor_exports as Adaptor,
100
- src_default as default
101
+ alterState,
102
+ dataPath,
103
+ dataValue,
104
+ src_default as default,
105
+ each,
106
+ execute,
107
+ field,
108
+ fields,
109
+ fn,
110
+ getForms,
111
+ getSubmissions,
112
+ http2 as http,
113
+ lastReferenceValue,
114
+ merge,
115
+ sourceValue
101
116
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfn/language-kobotoolbox",
3
- "version": "1.1.1",
3
+ "version": "1.2.0",
4
4
  "description": "A Kobo Toolbox Language Pack for OpenFn",
5
5
  "homepage": "https://docs.openfn.org",
6
6
  "repository": {
@@ -38,4 +38,4 @@ export function getForms(params: object, callback: Function): Operation;
38
38
  * @returns {Operation}
39
39
  */
40
40
  export function getSubmissions(params: object, callback: Function): Operation;
41
- export { alterState, dataPath, dataValue, each, field, fields, http, lastReferenceValue, merge, sourceValue } from "@openfn/language-common";
41
+ export { fn, alterState, dataPath, dataValue, each, field, fields, http, lastReferenceValue, merge, sourceValue } from "@openfn/language-common";
package/types/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export { Adaptor };
2
1
  export default Adaptor;
2
+ export * from "./Adaptor";
3
3
  import * as Adaptor from "./Adaptor";