@openfn/language-kobotoolbox 2.1.0 → 2.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
@@ -472,6 +472,83 @@
472
472
  ]
473
473
  },
474
474
  "valid": true
475
+ },
476
+ {
477
+ "name": "cursor",
478
+ "params": [
479
+ "value",
480
+ "options"
481
+ ],
482
+ "docs": {
483
+ "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.\nSee the usage guide at @{link https://docs.openfn.org/documentation/jobs/job-writing-guide#using-cursors}",
484
+ "tags": [
485
+ {
486
+ "title": "public",
487
+ "description": null,
488
+ "type": null
489
+ },
490
+ {
491
+ "title": "example",
492
+ "description": "cursor($.cursor, { defaultValue: 'today' })",
493
+ "caption": "Use a cursor from state if present, or else use the default value"
494
+ },
495
+ {
496
+ "title": "example",
497
+ "description": "cursor(22)",
498
+ "caption": "Use a pagination cursor"
499
+ },
500
+ {
501
+ "title": "function",
502
+ "description": null,
503
+ "name": null
504
+ },
505
+ {
506
+ "title": "param",
507
+ "description": "the cursor value. Usually an ISO date, natural language date, or page number",
508
+ "type": {
509
+ "type": "NameExpression",
510
+ "name": "any"
511
+ },
512
+ "name": "value"
513
+ },
514
+ {
515
+ "title": "param",
516
+ "description": "options to control the cursor.",
517
+ "type": {
518
+ "type": "NameExpression",
519
+ "name": "object"
520
+ },
521
+ "name": "options"
522
+ },
523
+ {
524
+ "title": "param",
525
+ "description": "set the cursor key. Will persist through the whole run.",
526
+ "type": {
527
+ "type": "NameExpression",
528
+ "name": "string"
529
+ },
530
+ "name": "options.key"
531
+ },
532
+ {
533
+ "title": "param",
534
+ "description": "the value to use if value is falsy",
535
+ "type": {
536
+ "type": "NameExpression",
537
+ "name": "any"
538
+ },
539
+ "name": "options.defaultValue"
540
+ },
541
+ {
542
+ "title": "returns",
543
+ "description": null,
544
+ "type": {
545
+ "type": "NameExpression",
546
+ "name": "Operation"
547
+ }
548
+ }
549
+ ]
550
+ },
551
+ "valid": false
475
552
  }
476
553
  ]
477
554
  }
package/dist/index.cjs CHANGED
@@ -20,6 +20,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  var src_exports = {};
21
21
  __export(src_exports, {
22
22
  alterState: () => import_language_common2.alterState,
23
+ cursor: () => import_language_common2.cursor,
23
24
  dataPath: () => import_language_common2.dataPath,
24
25
  dataValue: () => import_language_common2.dataValue,
25
26
  default: () => src_default,
@@ -42,6 +43,7 @@ module.exports = __toCommonJS(src_exports);
42
43
  var Adaptor_exports = {};
43
44
  __export(Adaptor_exports, {
44
45
  alterState: () => import_language_common2.alterState,
46
+ cursor: () => import_language_common2.cursor,
45
47
  dataPath: () => import_language_common2.dataPath,
46
48
  dataValue: () => import_language_common2.dataValue,
47
49
  each: () => import_language_common2.each,
@@ -139,6 +141,7 @@ var src_default = Adaptor_exports;
139
141
  // Annotate the CommonJS export names for ESM import in node:
140
142
  0 && (module.exports = {
141
143
  alterState,
144
+ cursor,
142
145
  dataPath,
143
146
  dataValue,
144
147
  each,
package/dist/index.js CHANGED
@@ -8,6 +8,7 @@ var __export = (target, all) => {
8
8
  var Adaptor_exports = {};
9
9
  __export(Adaptor_exports, {
10
10
  alterState: () => alterState,
11
+ cursor: () => cursor,
11
12
  dataPath: () => dataPath,
12
13
  dataValue: () => dataValue,
13
14
  each: () => each,
@@ -30,13 +31,14 @@ import {
30
31
  http
31
32
  } from "@openfn/language-common";
32
33
  import {
33
- fn,
34
34
  alterState,
35
+ cursor,
35
36
  dataPath,
36
37
  dataValue,
37
38
  each,
38
39
  field,
39
40
  fields,
41
+ fn,
40
42
  http as http2,
41
43
  lastReferenceValue,
42
44
  merge,
@@ -121,6 +123,7 @@ function getDeploymentInfo(params, callback) {
121
123
  var src_default = Adaptor_exports;
122
124
  export {
123
125
  alterState,
126
+ cursor,
124
127
  dataPath,
125
128
  dataValue,
126
129
  src_default as default,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfn/language-kobotoolbox",
3
- "version": "2.1.0",
3
+ "version": "2.2.0",
4
4
  "description": "A Kobo Toolbox Language Pack for OpenFn",
5
5
  "homepage": "https://docs.openfn.org",
6
6
  "repository": {
@@ -17,10 +17,9 @@
17
17
  "configuration-schema.json"
18
18
  ],
19
19
  "dependencies": {
20
- "@openfn/language-common": "^1.8.1"
20
+ "@openfn/language-common": "^1.13.0"
21
21
  },
22
22
  "devDependencies": {
23
- "@openfn/buildtools": "^1.0.2",
24
23
  "assertion-error": "^1.0.1",
25
24
  "chai": "^3.4.0",
26
25
  "deep-eql": "^0.1.3",
@@ -51,4 +51,4 @@ export function getSubmissions(params: object, callback: Function): Operation;
51
51
  * @returns {Operation}
52
52
  */
53
53
  export function getDeploymentInfo(params: object, callback: Function): Operation;
54
- export { fn, alterState, dataPath, dataValue, each, field, fields, http, lastReferenceValue, merge, sourceValue } from "@openfn/language-common";
54
+ export { alterState, cursor, dataPath, dataValue, each, field, fields, fn, http, lastReferenceValue, merge, sourceValue } from "@openfn/language-common";