@openfn/language-facebook 0.3.3 → 0.4.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 CHANGED
@@ -89,6 +89,59 @@
89
89
  },
90
90
  "valid": true
91
91
  },
92
+ {
93
+ "name": "fnIf",
94
+ "params": [
95
+ "condition",
96
+ "operation"
97
+ ],
98
+ "docs": {
99
+ "description": "A custom operation that will only execute the function if the condition returns true",
100
+ "tags": [
101
+ {
102
+ "title": "public",
103
+ "description": null,
104
+ "type": null
105
+ },
106
+ {
107
+ "title": "example",
108
+ "description": "fnIf((state) => state?.data?.name, get(\"https://example.com\"));"
109
+ },
110
+ {
111
+ "title": "function",
112
+ "description": null,
113
+ "name": null
114
+ },
115
+ {
116
+ "title": "param",
117
+ "description": "The condition that returns true",
118
+ "type": {
119
+ "type": "NameExpression",
120
+ "name": "Boolean"
121
+ },
122
+ "name": "condition"
123
+ },
124
+ {
125
+ "title": "param",
126
+ "description": "The operation needed to be executed.",
127
+ "type": {
128
+ "type": "NameExpression",
129
+ "name": "Operation"
130
+ },
131
+ "name": "operation"
132
+ },
133
+ {
134
+ "title": "returns",
135
+ "description": null,
136
+ "type": {
137
+ "type": "NameExpression",
138
+ "name": "Operation"
139
+ }
140
+ }
141
+ ]
142
+ },
143
+ "valid": true
144
+ },
92
145
  {
93
146
  "name": "sourceValue",
94
147
  "params": [
package/dist/index.cjs CHANGED
@@ -34,6 +34,7 @@ __export(src_exports, {
34
34
  field: () => import_language_common2.field,
35
35
  fields: () => import_language_common2.fields,
36
36
  fn: () => import_language_common2.fn,
37
+ fnIf: () => import_language_common2.fnIf,
37
38
  lastReferenceValue: () => import_language_common2.lastReferenceValue,
38
39
  merge: () => import_language_common2.merge,
39
40
  postMessage: () => postMessage,
@@ -52,6 +53,7 @@ __export(Adaptor_exports, {
52
53
  field: () => import_language_common2.field,
53
54
  fields: () => import_language_common2.fields,
54
55
  fn: () => import_language_common2.fn,
56
+ fnIf: () => import_language_common2.fnIf,
55
57
  lastReferenceValue: () => import_language_common2.lastReferenceValue,
56
58
  merge: () => import_language_common2.merge,
57
59
  postMessage: () => postMessage,
@@ -132,6 +134,7 @@ var src_default = Adaptor_exports;
132
134
  field,
133
135
  fields,
134
136
  fn,
137
+ fnIf,
135
138
  lastReferenceValue,
136
139
  merge,
137
140
  postMessage,
package/dist/index.js CHANGED
@@ -15,6 +15,7 @@ __export(Adaptor_exports, {
15
15
  field: () => field,
16
16
  fields: () => fields,
17
17
  fn: () => fn,
18
+ fnIf: () => fnIf,
18
19
  lastReferenceValue: () => lastReferenceValue,
19
20
  merge: () => merge,
20
21
  postMessage: () => postMessage,
@@ -32,6 +33,7 @@ import {
32
33
  fields,
33
34
  sourceValue,
34
35
  fn,
36
+ fnIf,
35
37
  alterState,
36
38
  each,
37
39
  merge,
@@ -110,6 +112,7 @@ export {
110
112
  field,
111
113
  fields,
112
114
  fn,
115
+ fnIf,
113
116
  lastReferenceValue,
114
117
  merge,
115
118
  postMessage,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfn/language-facebook",
3
- "version": "0.3.3",
3
+ "version": "0.4.0",
4
4
  "description": "An Language Package for Facebook Messenger API",
5
5
  "main": "dist/index.cjs",
6
6
  "author": "Open Function Group",
@@ -12,7 +12,7 @@
12
12
  "configuration-schema.json"
13
13
  ],
14
14
  "dependencies": {
15
- "@openfn/language-common": "^1.12.0",
15
+ "@openfn/language-common": "^1.14.0",
16
16
  "request": "^2.88.2"
17
17
  },
18
18
  "devDependencies": {
@@ -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 { field, fields, sourceValue, fn, alterState, each, merge, dataPath, dataValue, lastReferenceValue } from "@openfn/language-common";
31
+ export { field, fields, sourceValue, fn, fnIf, alterState, each, merge, dataPath, dataValue, lastReferenceValue } from "@openfn/language-common";