@openfn/language-msgraph 0.6.1 → 0.7.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
@@ -472,15 +472,15 @@
472
472
  "description": null,
473
473
  "type": null
474
474
  },
475
- {
476
- "title": "example",
477
- "description": "fn(state => {\n // do some things to state\n return state;\n});"
478
- },
479
475
  {
480
476
  "title": "function",
481
477
  "description": null,
482
478
  "name": null
483
479
  },
480
+ {
481
+ "title": "example",
482
+ "description": "fn(state => {\n // do some things to state\n return state;\n});"
483
+ },
484
484
  {
485
485
  "title": "param",
486
486
  "description": "is the function",
@@ -516,15 +516,15 @@
516
516
  "description": null,
517
517
  "type": null
518
518
  },
519
- {
520
- "title": "example",
521
- "description": "fnIf((state) => state?.data?.name, get(\"https://example.com\"));"
522
- },
523
519
  {
524
520
  "title": "function",
525
521
  "description": null,
526
522
  "name": null
527
523
  },
524
+ {
525
+ "title": "example",
526
+ "description": "fnIf((state) => state?.data?.name, get(\"https://example.com\"));"
527
+ },
528
528
  {
529
529
  "title": "param",
530
530
  "description": "The condition that returns true",
@@ -568,15 +568,15 @@
568
568
  "description": null,
569
569
  "type": null
570
570
  },
571
- {
572
- "title": "example",
573
- "description": "sourceValue('$.key')"
574
- },
575
571
  {
576
572
  "title": "function",
577
573
  "description": null,
578
574
  "name": null
579
575
  },
576
+ {
577
+ "title": "example",
578
+ "description": "sourceValue('$.key')"
579
+ },
580
580
  {
581
581
  "title": "param",
582
582
  "description": "JSONPath referencing a point in `state`.",
@@ -611,15 +611,15 @@
611
611
  "description": null,
612
612
  "type": null
613
613
  },
614
- {
615
- "title": "example",
616
- "description": "dataPath('key')"
617
- },
618
614
  {
619
615
  "title": "function",
620
616
  "description": null,
621
617
  "name": null
622
618
  },
619
+ {
620
+ "title": "example",
621
+ "description": "dataPath('key')"
622
+ },
623
623
  {
624
624
  "title": "param",
625
625
  "description": "JSONPath referencing a point in `data`.",
@@ -654,15 +654,15 @@
654
654
  "description": null,
655
655
  "type": null
656
656
  },
657
- {
658
- "title": "example",
659
- "description": "dataValue('key')"
660
- },
661
657
  {
662
658
  "title": "function",
663
659
  "description": null,
664
660
  "name": null
665
661
  },
662
+ {
663
+ "title": "example",
664
+ "description": "dataValue('key')"
665
+ },
666
666
  {
667
667
  "title": "param",
668
668
  "description": "JSONPath referencing a point in `data`.",
@@ -697,15 +697,15 @@
697
697
  "description": null,
698
698
  "type": null
699
699
  },
700
- {
701
- "title": "example",
702
- "description": "lastReferenceValue('key')"
703
- },
704
700
  {
705
701
  "title": "function",
706
702
  "description": null,
707
703
  "name": null
708
704
  },
705
+ {
706
+ "title": "example",
707
+ "description": "lastReferenceValue('key')"
708
+ },
709
709
  {
710
710
  "title": "param",
711
711
  "description": "JSONPath referencing a point in `references`.",
@@ -741,15 +741,15 @@
741
741
  "description": null,
742
742
  "type": null
743
743
  },
744
- {
745
- "title": "example",
746
- "description": "each(\"$.[*]\",\n create(\"SObject\",\n field(\"FirstName\", sourceValue(\"$.firstName\"))\n )\n)"
747
- },
748
744
  {
749
745
  "title": "function",
750
746
  "description": null,
751
747
  "name": null
752
748
  },
749
+ {
750
+ "title": "example",
751
+ "description": "each(\"$.[*]\",\n create(\"SObject\",\n field(\"FirstName\", sourceValue(\"$.firstName\"))\n )\n)"
752
+ },
753
753
  {
754
754
  "title": "param",
755
755
  "description": "JSONPath referencing a point in `state`.",
@@ -794,15 +794,15 @@
794
794
  "description": null,
795
795
  "type": null
796
796
  },
797
- {
798
- "title": "example",
799
- "description": "field('destination_field_name__c', 'value')"
800
- },
801
797
  {
802
798
  "title": "function",
803
799
  "description": null,
804
800
  "name": null
805
801
  },
802
+ {
803
+ "title": "example",
804
+ "description": "field('destination_field_name__c', 'value')"
805
+ },
806
806
  {
807
807
  "title": "param",
808
808
  "description": "Name of the field",
@@ -846,15 +846,15 @@
846
846
  "description": null,
847
847
  "type": null
848
848
  },
849
- {
850
- "title": "example",
851
- "description": "fields(list_of_fields)"
852
- },
853
849
  {
854
850
  "title": "function",
855
851
  "description": null,
856
852
  "name": null
857
853
  },
854
+ {
855
+ "title": "example",
856
+ "description": "fields(list_of_fields)"
857
+ },
858
858
  {
859
859
  "title": "param",
860
860
  "description": "a list of fields",
@@ -899,6 +899,11 @@
899
899
  "description": null,
900
900
  "name": null
901
901
  },
902
+ {
903
+ "title": "public",
904
+ "description": null,
905
+ "type": null
906
+ },
902
907
  {
903
908
  "title": "param",
904
909
  "description": null,
@@ -1017,6 +1022,11 @@
1017
1022
  "description": null,
1018
1023
  "type": null
1019
1024
  },
1025
+ {
1026
+ "title": "function",
1027
+ "description": null,
1028
+ "name": null
1029
+ },
1020
1030
  {
1021
1031
  "title": "example",
1022
1032
  "description": "cursor($.cursor, { defaultValue: 'today' })",
@@ -1027,11 +1037,6 @@
1027
1037
  "description": "cursor(22)",
1028
1038
  "caption": "Use a pagination cursor"
1029
1039
  },
1030
- {
1031
- "title": "function",
1032
- "description": null,
1033
- "name": null
1034
- },
1035
1040
  {
1036
1041
  "title": "param",
1037
1042
  "description": "the cursor value. Usually an ISO date, natural language date, or page number",
package/dist/index.cjs CHANGED
@@ -238,7 +238,8 @@ function execute(...operations) {
238
238
  return (state) => {
239
239
  return (0, import_language_common2.execute)(...operations)({
240
240
  ...initialState,
241
- ...state
241
+ ...state,
242
+ configuration: (0, import_util2.normalizeOauthConfig)(state.configuration)
242
243
  }).then(cleanup).catch((error) => {
243
244
  cleanup(state);
244
245
  throw error;
package/dist/index.js CHANGED
@@ -31,7 +31,10 @@ __export(Adaptor_exports, {
31
31
  uploadFile: () => uploadFile
32
32
  });
33
33
  import { execute as commonExecute } from "@openfn/language-common";
34
- import { expandReferences as expandReferences2 } from "@openfn/language-common/util";
34
+ import {
35
+ expandReferences as expandReferences2,
36
+ normalizeOauthConfig
37
+ } from "@openfn/language-common/util";
35
38
 
36
39
  // src/Utils.js
37
40
  import xlsx from "xlsx";
@@ -205,7 +208,8 @@ function execute(...operations) {
205
208
  return (state) => {
206
209
  return commonExecute(...operations)({
207
210
  ...initialState,
208
- ...state
211
+ ...state,
212
+ configuration: normalizeOauthConfig(state.configuration)
209
213
  }).then(cleanup).catch((error) => {
210
214
  cleanup(state);
211
215
  throw error;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfn/language-msgraph",
3
- "version": "0.6.1",
3
+ "version": "0.7.1",
4
4
  "description": "Microsoft Graph Language Pack for OpenFn",
5
5
  "type": "module",
6
6
  "exports": {
@@ -21,7 +21,7 @@
21
21
  "dependencies": {
22
22
  "undici": "^5.28.4",
23
23
  "xlsx": "https://cdn.sheetjs.com/xlsx-0.20.0/xlsx-0.20.0.tgz",
24
- "@openfn/language-common": "1.15.0"
24
+ "@openfn/language-common": "1.15.1"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@openfn/simple-ast": "0.4.1",