@openfn/language-facebook 0.4.29 → 0.5.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 +92 -0
- package/dist/index.cjs +6 -0
- package/dist/index.js +12 -6
- package/package.json +2 -2
- package/types/Adaptor.d.ts +1 -1
package/ast.json
CHANGED
|
@@ -378,6 +378,49 @@
|
|
|
378
378
|
},
|
|
379
379
|
"valid": true
|
|
380
380
|
},
|
|
381
|
+
{
|
|
382
|
+
"name": "combine",
|
|
383
|
+
"params": [
|
|
384
|
+
"operations"
|
|
385
|
+
],
|
|
386
|
+
"docs": {
|
|
387
|
+
"description": "Combines two operations into one",
|
|
388
|
+
"tags": [
|
|
389
|
+
{
|
|
390
|
+
"title": "public",
|
|
391
|
+
"description": null,
|
|
392
|
+
"type": null
|
|
393
|
+
},
|
|
394
|
+
{
|
|
395
|
+
"title": "function",
|
|
396
|
+
"description": null,
|
|
397
|
+
"name": null
|
|
398
|
+
},
|
|
399
|
+
{
|
|
400
|
+
"title": "example",
|
|
401
|
+
"description": "combine(\n create('foo'),\n delete('bar')\n)"
|
|
402
|
+
},
|
|
403
|
+
{
|
|
404
|
+
"title": "param",
|
|
405
|
+
"description": "Operations to be performed.",
|
|
406
|
+
"type": {
|
|
407
|
+
"type": "NameExpression",
|
|
408
|
+
"name": "Operations"
|
|
409
|
+
},
|
|
410
|
+
"name": "operations"
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
"title": "returns",
|
|
414
|
+
"description": null,
|
|
415
|
+
"type": {
|
|
416
|
+
"type": "NameExpression",
|
|
417
|
+
"name": "Operation"
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
]
|
|
421
|
+
},
|
|
422
|
+
"valid": true
|
|
423
|
+
},
|
|
381
424
|
{
|
|
382
425
|
"name": "field",
|
|
383
426
|
"params": [
|
|
@@ -531,6 +574,55 @@
|
|
|
531
574
|
]
|
|
532
575
|
},
|
|
533
576
|
"valid": true
|
|
577
|
+
},
|
|
578
|
+
{
|
|
579
|
+
"name": "log",
|
|
580
|
+
"params": [
|
|
581
|
+
"args"
|
|
582
|
+
],
|
|
583
|
+
"docs": {
|
|
584
|
+
"description": "Outputs a message, like calling `console.log`. Use this at the top level of your job code, but not inside callbacks.",
|
|
585
|
+
"tags": [
|
|
586
|
+
{
|
|
587
|
+
"title": "public",
|
|
588
|
+
"description": null,
|
|
589
|
+
"type": null
|
|
590
|
+
},
|
|
591
|
+
{
|
|
592
|
+
"title": "function",
|
|
593
|
+
"description": null,
|
|
594
|
+
"name": null
|
|
595
|
+
},
|
|
596
|
+
{
|
|
597
|
+
"title": "example",
|
|
598
|
+
"description": "log('Patient List::', $.patients);",
|
|
599
|
+
"caption": "Log values from state"
|
|
600
|
+
},
|
|
601
|
+
{
|
|
602
|
+
"title": "example",
|
|
603
|
+
"description": "fn((state) => {\n console.log(state.data);\n return state;\n})",
|
|
604
|
+
"caption": "Use console.log inside a callback or fn block"
|
|
605
|
+
},
|
|
606
|
+
{
|
|
607
|
+
"title": "param",
|
|
608
|
+
"description": "A value or message to display in the logs",
|
|
609
|
+
"type": {
|
|
610
|
+
"type": "NameExpression",
|
|
611
|
+
"name": "any"
|
|
612
|
+
},
|
|
613
|
+
"name": "args"
|
|
614
|
+
},
|
|
615
|
+
{
|
|
616
|
+
"title": "returns",
|
|
617
|
+
"description": null,
|
|
618
|
+
"type": {
|
|
619
|
+
"type": "NameExpression",
|
|
620
|
+
"name": "Operation"
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
]
|
|
624
|
+
},
|
|
625
|
+
"valid": true
|
|
534
626
|
}
|
|
535
627
|
]
|
|
536
628
|
}
|
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
|
alterState: () => import_language_common2.alterState,
|
|
29
|
+
combine: () => import_language_common2.combine,
|
|
29
30
|
dataPath: () => import_language_common2.dataPath,
|
|
30
31
|
dataValue: () => import_language_common2.dataValue,
|
|
31
32
|
default: () => src_default,
|
|
@@ -36,6 +37,7 @@ __export(src_exports, {
|
|
|
36
37
|
fn: () => import_language_common2.fn,
|
|
37
38
|
fnIf: () => import_language_common2.fnIf,
|
|
38
39
|
lastReferenceValue: () => import_language_common2.lastReferenceValue,
|
|
40
|
+
log: () => import_language_common2.log,
|
|
39
41
|
merge: () => import_language_common2.merge,
|
|
40
42
|
postMessage: () => postMessage,
|
|
41
43
|
sourceValue: () => import_language_common2.sourceValue
|
|
@@ -46,6 +48,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
46
48
|
var Adaptor_exports = {};
|
|
47
49
|
__export(Adaptor_exports, {
|
|
48
50
|
alterState: () => import_language_common2.alterState,
|
|
51
|
+
combine: () => import_language_common2.combine,
|
|
49
52
|
dataPath: () => import_language_common2.dataPath,
|
|
50
53
|
dataValue: () => import_language_common2.dataValue,
|
|
51
54
|
each: () => import_language_common2.each,
|
|
@@ -55,6 +58,7 @@ __export(Adaptor_exports, {
|
|
|
55
58
|
fn: () => import_language_common2.fn,
|
|
56
59
|
fnIf: () => import_language_common2.fnIf,
|
|
57
60
|
lastReferenceValue: () => import_language_common2.lastReferenceValue,
|
|
61
|
+
log: () => import_language_common2.log,
|
|
58
62
|
merge: () => import_language_common2.merge,
|
|
59
63
|
postMessage: () => postMessage,
|
|
60
64
|
sourceValue: () => import_language_common2.sourceValue
|
|
@@ -128,6 +132,7 @@ var src_default = Adaptor_exports;
|
|
|
128
132
|
// Annotate the CommonJS export names for ESM import in node:
|
|
129
133
|
0 && (module.exports = {
|
|
130
134
|
alterState,
|
|
135
|
+
combine,
|
|
131
136
|
dataPath,
|
|
132
137
|
dataValue,
|
|
133
138
|
each,
|
|
@@ -137,6 +142,7 @@ var src_default = Adaptor_exports;
|
|
|
137
142
|
fn,
|
|
138
143
|
fnIf,
|
|
139
144
|
lastReferenceValue,
|
|
145
|
+
log,
|
|
140
146
|
merge,
|
|
141
147
|
postMessage,
|
|
142
148
|
sourceValue
|
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
|
alterState: () => alterState,
|
|
11
|
+
combine: () => combine,
|
|
11
12
|
dataPath: () => dataPath,
|
|
12
13
|
dataValue: () => dataValue,
|
|
13
14
|
each: () => each,
|
|
@@ -17,6 +18,7 @@ __export(Adaptor_exports, {
|
|
|
17
18
|
fn: () => fn,
|
|
18
19
|
fnIf: () => fnIf,
|
|
19
20
|
lastReferenceValue: () => lastReferenceValue,
|
|
21
|
+
log: () => log,
|
|
20
22
|
merge: () => merge,
|
|
21
23
|
postMessage: () => postMessage,
|
|
22
24
|
sourceValue: () => sourceValue
|
|
@@ -31,17 +33,19 @@ import {
|
|
|
31
33
|
} from "@openfn/language-common/util";
|
|
32
34
|
import request from "request";
|
|
33
35
|
import {
|
|
36
|
+
alterState,
|
|
37
|
+
combine,
|
|
38
|
+
dataPath,
|
|
39
|
+
dataValue,
|
|
40
|
+
each,
|
|
34
41
|
field,
|
|
35
42
|
fields,
|
|
36
|
-
sourceValue,
|
|
37
43
|
fn,
|
|
38
44
|
fnIf,
|
|
39
|
-
|
|
40
|
-
|
|
45
|
+
lastReferenceValue,
|
|
46
|
+
log,
|
|
41
47
|
merge,
|
|
42
|
-
|
|
43
|
-
dataValue,
|
|
44
|
-
lastReferenceValue
|
|
48
|
+
sourceValue
|
|
45
49
|
} from "@openfn/language-common";
|
|
46
50
|
function execute(...operations) {
|
|
47
51
|
const initialState = {
|
|
@@ -107,6 +111,7 @@ function postMessage(params) {
|
|
|
107
111
|
var src_default = Adaptor_exports;
|
|
108
112
|
export {
|
|
109
113
|
alterState,
|
|
114
|
+
combine,
|
|
110
115
|
dataPath,
|
|
111
116
|
dataValue,
|
|
112
117
|
src_default as default,
|
|
@@ -117,6 +122,7 @@ export {
|
|
|
117
122
|
fn,
|
|
118
123
|
fnIf,
|
|
119
124
|
lastReferenceValue,
|
|
125
|
+
log,
|
|
120
126
|
merge,
|
|
121
127
|
postMessage,
|
|
122
128
|
sourceValue
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openfn/language-facebook",
|
|
3
3
|
"label": "Facebook",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.5.0",
|
|
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": "3.3.
|
|
17
|
+
"@openfn/language-common": "3.3.2"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"assertion-error": "^2.0.0",
|
package/types/Adaptor.d.ts
CHANGED
|
@@ -28,4 +28,4 @@ export function execute(...operations: Operations): Operation;
|
|
|
28
28
|
* @returns {Operation}
|
|
29
29
|
*/
|
|
30
30
|
export function postMessage(params: object): Operation;
|
|
31
|
-
export {
|
|
31
|
+
export { alterState, combine, dataPath, dataValue, each, field, fields, fn, fnIf, lastReferenceValue, log, merge, sourceValue } from "@openfn/language-common";
|