@openfn/language-googlesheets 2.3.1 → 2.4.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
@@ -614,6 +614,83 @@
614
614
  ]
615
615
  },
616
616
  "valid": true
617
+ },
618
+ {
619
+ "name": "cursor",
620
+ "params": [
621
+ "value",
622
+ "options"
623
+ ],
624
+ "docs": {
625
+ "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}",
626
+ "tags": [
627
+ {
628
+ "title": "public",
629
+ "description": null,
630
+ "type": null
631
+ },
632
+ {
633
+ "title": "example",
634
+ "description": "cursor($.cursor, { defaultValue: 'today' })",
635
+ "caption": "Use a cursor from state if present, or else use the default value"
636
+ },
637
+ {
638
+ "title": "example",
639
+ "description": "cursor(22)",
640
+ "caption": "Use a pagination cursor"
641
+ },
642
+ {
643
+ "title": "function",
644
+ "description": null,
645
+ "name": null
646
+ },
647
+ {
648
+ "title": "param",
649
+ "description": "the cursor value. Usually an ISO date, natural language date, or page number",
650
+ "type": {
651
+ "type": "NameExpression",
652
+ "name": "any"
653
+ },
654
+ "name": "value"
655
+ },
656
+ {
657
+ "title": "param",
658
+ "description": "options to control the cursor.",
659
+ "type": {
660
+ "type": "NameExpression",
661
+ "name": "object"
662
+ },
663
+ "name": "options"
664
+ },
665
+ {
666
+ "title": "param",
667
+ "description": "set the cursor key. Will persist through the whole run.",
668
+ "type": {
669
+ "type": "NameExpression",
670
+ "name": "string"
671
+ },
672
+ "name": "options.key"
673
+ },
674
+ {
675
+ "title": "param",
676
+ "description": "the value to use if value is falsy",
677
+ "type": {
678
+ "type": "NameExpression",
679
+ "name": "any"
680
+ },
681
+ "name": "options.defaultValue"
682
+ },
683
+ {
684
+ "title": "returns",
685
+ "description": null,
686
+ "type": {
687
+ "type": "NameExpression",
688
+ "name": "Operation"
689
+ }
690
+ }
691
+ ]
692
+ },
693
+ "valid": false
617
694
  }
618
695
  ]
619
696
  }
package/dist/index.cjs CHANGED
@@ -23,6 +23,7 @@ __export(src_exports, {
23
23
  appendValues: () => appendValues,
24
24
  batchUpdateValues: () => batchUpdateValues,
25
25
  combine: () => import_language_common2.combine,
26
+ cursor: () => import_language_common2.cursor,
26
27
  dataPath: () => import_language_common2.dataPath,
27
28
  dataValue: () => import_language_common2.dataValue,
28
29
  default: () => src_default,
@@ -46,6 +47,7 @@ __export(Adaptor_exports, {
46
47
  appendValues: () => appendValues,
47
48
  batchUpdateValues: () => batchUpdateValues,
48
49
  combine: () => import_language_common2.combine,
50
+ cursor: () => import_language_common2.cursor,
49
51
  dataPath: () => import_language_common2.dataPath,
50
52
  dataValue: () => import_language_common2.dataValue,
51
53
  each: () => import_language_common2.each,
@@ -201,6 +203,7 @@ var src_default = Adaptor_exports;
201
203
  appendValues,
202
204
  batchUpdateValues,
203
205
  combine,
206
+ cursor,
204
207
  dataPath,
205
208
  dataValue,
206
209
  each,
package/dist/index.js CHANGED
@@ -11,6 +11,7 @@ __export(Adaptor_exports, {
11
11
  appendValues: () => appendValues,
12
12
  batchUpdateValues: () => batchUpdateValues,
13
13
  combine: () => combine,
14
+ cursor: () => cursor,
14
15
  dataPath: () => dataPath,
15
16
  dataValue: () => dataValue,
16
17
  each: () => each,
@@ -36,6 +37,7 @@ import { google } from "googleapis";
36
37
  import {
37
38
  alterState,
38
39
  combine,
40
+ cursor,
39
41
  dataPath,
40
42
  dataValue,
41
43
  each,
@@ -184,6 +186,7 @@ export {
184
186
  appendValues,
185
187
  batchUpdateValues,
186
188
  combine,
189
+ cursor,
187
190
  dataPath,
188
191
  dataValue,
189
192
  src_default as default,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfn/language-googlesheets",
3
- "version": "2.3.1",
3
+ "version": "2.4.0",
4
4
  "description": "A Google Sheets Language Pack for OpenFn",
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.12.0",
26
+ "@openfn/language-common": "^1.13.0",
27
27
  "googleapis": "100.0.0"
28
28
  },
29
29
  "devDependencies": {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Execute a sequence of operations.
2
+ * Execute a sequence of oper.
3
3
  * Wraps `language-common/execute`, and prepends initial state for http.
4
4
  * @example
5
5
  * execute(
@@ -75,4 +75,4 @@ export function batchUpdateValues(params: {
75
75
  * @returns {Operation} spreadsheet information
76
76
  */
77
77
  export function getValues(spreadsheetId: string, range: string, callback?: Function): Operation;
78
- export { alterState, combine, dataPath, dataValue, each, field, fields, fn, http, lastReferenceValue, merge, sourceValue } from "@openfn/language-common";
78
+ export { alterState, combine, cursor, dataPath, dataValue, each, field, fields, fn, http, lastReferenceValue, merge, sourceValue } from "@openfn/language-common";