@openfn/language-facebook 0.3.1 → 0.3.3

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.
@@ -1,17 +1,21 @@
1
1
  {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "properties": {
4
- "accessToken": {
5
- "title": "Access Token",
6
- "type": "string",
7
- "description": "Your Facebook API access token",
8
- "writeOnly": true,
9
- "minLength": 1
10
- }
11
- },
12
- "type": "object",
13
- "additionalProperties": true,
14
- "required": [
15
- "accessToken"
16
- ]
17
- }
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$comment": "OAuth2",
4
+ "properties": {
5
+ "access_token": {
6
+ "title": "Access Token",
7
+ "type": "string",
8
+ "description": "Your Facebook API access token",
9
+ "writeOnly": true,
10
+ "minLength": 1,
11
+ "examples": [
12
+ "EAAGm0PX4ZCpsBAEHuZBwZBZCDEZDZD7ZC8ZBZBt7MbZA7sVZA"
13
+ ]
14
+ }
15
+ },
16
+ "type": "object",
17
+ "additionalProperties": true,
18
+ "required": [
19
+ "access_token"
20
+ ]
21
+ }
package/dist/index.cjs CHANGED
@@ -58,6 +58,7 @@ __export(Adaptor_exports, {
58
58
  sourceValue: () => import_language_common2.sourceValue
59
59
  });
60
60
  var import_language_common = require("@openfn/language-common");
61
+ var import_util = require("@openfn/language-common/util");
61
62
  var import_request = __toESM(require("request"), 1);
62
63
  var import_language_common2 = require("@openfn/language-common");
63
64
  function execute(...operations) {
@@ -68,7 +69,8 @@ function execute(...operations) {
68
69
  return (state) => {
69
70
  return (0, import_language_common.execute)(...operations)({
70
71
  ...initialState,
71
- ...state
72
+ ...state,
73
+ configuration: (0, import_util.normalizeOauthConfig)(state.configuration)
72
74
  });
73
75
  };
74
76
  }
package/dist/index.js CHANGED
@@ -25,6 +25,7 @@ import {
25
25
  expandReferences,
26
26
  composeNextState
27
27
  } from "@openfn/language-common";
28
+ import { normalizeOauthConfig } from "@openfn/language-common/util";
28
29
  import request from "request";
29
30
  import {
30
31
  field,
@@ -46,7 +47,8 @@ function execute(...operations) {
46
47
  return (state) => {
47
48
  return commonExecute(...operations)({
48
49
  ...initialState,
49
- ...state
50
+ ...state,
51
+ configuration: normalizeOauthConfig(state.configuration)
50
52
  });
51
53
  };
52
54
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfn/language-facebook",
3
- "version": "0.3.1",
3
+ "version": "0.3.3",
4
4
  "description": "An Language Package for Facebook Messenger API",
5
5
  "main": "dist/index.cjs",
6
6
  "author": "Open Function Group",
@@ -12,11 +12,10 @@
12
12
  "configuration-schema.json"
13
13
  ],
14
14
  "dependencies": {
15
- "@openfn/language-common": "^1.8.1",
15
+ "@openfn/language-common": "^1.12.0",
16
16
  "request": "^2.88.2"
17
17
  },
18
18
  "devDependencies": {
19
- "@openfn/buildtools": "^1.0.2",
20
19
  "@openfn/simple-ast": "0.4.1",
21
20
  "assertion-error": "^2.0.0",
22
21
  "chai": "^4.3.7",