@openfn/language-msgraph 0.4.0 → 0.5.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 CHANGED
@@ -949,6 +949,83 @@
949
949
  ]
950
950
  },
951
951
  "valid": true
952
+ },
953
+ {
954
+ "name": "cursor",
955
+ "params": [
956
+ "value",
957
+ "options"
958
+ ],
959
+ "docs": {
960
+ "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}",
961
+ "tags": [
962
+ {
963
+ "title": "public",
964
+ "description": null,
965
+ "type": null
966
+ },
967
+ {
968
+ "title": "example",
969
+ "description": "cursor($.cursor, { defaultValue: 'today' })",
970
+ "caption": "Use a cursor from state if present, or else use the default value"
971
+ },
972
+ {
973
+ "title": "example",
974
+ "description": "cursor(22)",
975
+ "caption": "Use a pagination cursor"
976
+ },
977
+ {
978
+ "title": "function",
979
+ "description": null,
980
+ "name": null
981
+ },
982
+ {
983
+ "title": "param",
984
+ "description": "the cursor value. Usually an ISO date, natural language date, or page number",
985
+ "type": {
986
+ "type": "NameExpression",
987
+ "name": "any"
988
+ },
989
+ "name": "value"
990
+ },
991
+ {
992
+ "title": "param",
993
+ "description": "options to control the cursor.",
994
+ "type": {
995
+ "type": "NameExpression",
996
+ "name": "object"
997
+ },
998
+ "name": "options"
999
+ },
1000
+ {
1001
+ "title": "param",
1002
+ "description": "set the cursor key. Will persist through the whole run.",
1003
+ "type": {
1004
+ "type": "NameExpression",
1005
+ "name": "string"
1006
+ },
1007
+ "name": "options.key"
1008
+ },
1009
+ {
1010
+ "title": "param",
1011
+ "description": "the value to use if value is falsy",
1012
+ "type": {
1013
+ "type": "NameExpression",
1014
+ "name": "any"
1015
+ },
1016
+ "name": "options.defaultValue"
1017
+ },
1018
+ {
1019
+ "title": "returns",
1020
+ "description": null,
1021
+ "type": {
1022
+ "type": "NameExpression",
1023
+ "name": "Operation"
1024
+ }
1025
+ }
1026
+ ]
1027
+ },
1028
+ "valid": false
952
1029
  }
953
1030
  ]
954
1031
  }
package/dist/index.cjs CHANGED
@@ -26,6 +26,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
26
26
  var src_exports = {};
27
27
  __export(src_exports, {
28
28
  create: () => create,
29
+ cursor: () => import_language_common3.cursor,
29
30
  dataPath: () => import_language_common3.dataPath,
30
31
  dataValue: () => import_language_common3.dataValue,
31
32
  dateFns: () => import_language_common3.dateFns,
@@ -53,6 +54,7 @@ module.exports = __toCommonJS(src_exports);
53
54
  var Adaptor_exports = {};
54
55
  __export(Adaptor_exports, {
55
56
  create: () => create,
57
+ cursor: () => import_language_common3.cursor,
56
58
  dataPath: () => import_language_common3.dataPath,
57
59
  dataValue: () => import_language_common3.dataValue,
58
60
  dateFns: () => import_language_common3.dateFns,
@@ -413,6 +415,7 @@ var src_default = Adaptor_exports;
413
415
  // Annotate the CommonJS export names for ESM import in node:
414
416
  0 && (module.exports = {
415
417
  create,
418
+ cursor,
416
419
  dataPath,
417
420
  dataValue,
418
421
  dateFns,
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
  create: () => create,
11
+ cursor: () => cursor,
11
12
  dataPath: () => dataPath,
12
13
  dataValue: () => dataValue,
13
14
  dateFns: () => dateFns,
@@ -171,6 +172,7 @@ function assertResources(resources) {
171
172
 
172
173
  // src/Adaptor.js
173
174
  import {
175
+ cursor,
174
176
  dataPath,
175
177
  dataValue,
176
178
  dateFns,
@@ -379,6 +381,7 @@ function uploadFile(resource, data, callback) {
379
381
  var src_default = Adaptor_exports;
380
382
  export {
381
383
  create,
384
+ cursor,
382
385
  dataPath,
383
386
  dataValue,
384
387
  dateFns,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfn/language-msgraph",
3
- "version": "0.4.0",
3
+ "version": "0.5.1",
4
4
  "description": "Microsoft Graph Language Pack for OpenFn",
5
5
  "type": "module",
6
6
  "exports": {
@@ -21,10 +21,9 @@
21
21
  "dependencies": {
22
22
  "undici": "^5.22.1",
23
23
  "xlsx": "https://cdn.sheetjs.com/xlsx-0.20.0/xlsx-0.20.0.tgz",
24
- "@openfn/language-common": "1.11.1"
24
+ "@openfn/language-common": "1.13.1"
25
25
  },
26
26
  "devDependencies": {
27
- "@openfn/buildtools": "^1.0.2",
28
27
  "@openfn/simple-ast": "0.4.1",
29
28
  "assertion-error": "2.0.0",
30
29
  "chai": "4.3.6",
@@ -121,4 +121,4 @@ export function uploadFile(resource: {
121
121
  onConflict?: string;
122
122
  }, data: any, callback: Function): Operation;
123
123
  export { request, sheetToBuffer } from "./Utils";
124
- export { dataPath, dataValue, dateFns, each, field, fields, fn, lastReferenceValue, merge, sourceValue, parseCsv } from "@openfn/language-common";
124
+ export { cursor, dataPath, dataValue, dateFns, each, field, fields, fn, lastReferenceValue, merge, sourceValue, parseCsv } from "@openfn/language-common";