@openfn/language-facebook 0.4.15 → 0.4.17
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/dist/index.cjs +2 -1
- package/dist/index.js +6 -3
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -87,7 +87,8 @@ function postMessage(params) {
|
|
|
87
87
|
}
|
|
88
88
|
const { accessToken } = state.configuration;
|
|
89
89
|
const url = `https://graph.facebook.com/v2.6/me/messages?access_token=${accessToken}`;
|
|
90
|
-
const
|
|
90
|
+
const [resolvedParams] = (0, import_util.expandReferences)(state, params);
|
|
91
|
+
const { headers, message, recipient } = resolvedParams;
|
|
91
92
|
const body = {
|
|
92
93
|
messaging_type: "UPDATE",
|
|
93
94
|
recipient,
|
package/dist/index.js
CHANGED
|
@@ -23,10 +23,12 @@ __export(Adaptor_exports, {
|
|
|
23
23
|
});
|
|
24
24
|
import {
|
|
25
25
|
execute as commonExecute,
|
|
26
|
-
expandReferences,
|
|
27
26
|
composeNextState
|
|
28
27
|
} from "@openfn/language-common";
|
|
29
|
-
import {
|
|
28
|
+
import {
|
|
29
|
+
normalizeOauthConfig,
|
|
30
|
+
expandReferences
|
|
31
|
+
} from "@openfn/language-common/util";
|
|
30
32
|
import request from "request";
|
|
31
33
|
import {
|
|
32
34
|
field,
|
|
@@ -65,7 +67,8 @@ function postMessage(params) {
|
|
|
65
67
|
}
|
|
66
68
|
const { accessToken } = state.configuration;
|
|
67
69
|
const url = `https://graph.facebook.com/v2.6/me/messages?access_token=${accessToken}`;
|
|
68
|
-
const
|
|
70
|
+
const [resolvedParams] = expandReferences(state, params);
|
|
71
|
+
const { headers, message, recipient } = resolvedParams;
|
|
69
72
|
const body = {
|
|
70
73
|
messaging_type: "UPDATE",
|
|
71
74
|
recipient,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openfn/language-facebook",
|
|
3
3
|
"label": "Facebook",
|
|
4
|
-
"version": "0.4.
|
|
4
|
+
"version": "0.4.17",
|
|
5
5
|
"description": "An Language Package for Facebook Messenger API",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
7
7
|
"author": "Open Function Group",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
],
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"request": "^2.88.2",
|
|
17
|
-
"@openfn/language-common": "
|
|
17
|
+
"@openfn/language-common": "3.0.1"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"assertion-error": "^2.0.0",
|