@openfn/language-googlehealthcare 1.0.1 → 1.1.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
@@ -149,6 +149,59 @@
149
149
  },
150
150
  "valid": true
151
151
  },
152
+ {
153
+ "name": "fnIf",
154
+ "params": [
155
+ "condition",
156
+ "operation"
157
+ ],
158
+ "docs": {
159
+ "description": "A custom operation that will only execute the function if the condition returns true",
160
+ "tags": [
161
+ {
162
+ "title": "public",
163
+ "description": null,
164
+ "type": null
165
+ },
166
+ {
167
+ "title": "example",
168
+ "description": "fnIf((state) => state?.data?.name, get(\"https://example.com\"));"
169
+ },
170
+ {
171
+ "title": "function",
172
+ "description": null,
173
+ "name": null
174
+ },
175
+ {
176
+ "title": "param",
177
+ "description": "The condition that returns true",
178
+ "type": {
179
+ "type": "NameExpression",
180
+ "name": "Boolean"
181
+ },
182
+ "name": "condition"
183
+ },
184
+ {
185
+ "title": "param",
186
+ "description": "The operation needed to be executed.",
187
+ "type": {
188
+ "type": "NameExpression",
189
+ "name": "Operation"
190
+ },
191
+ "name": "operation"
192
+ },
193
+ {
194
+ "title": "returns",
195
+ "description": null,
196
+ "type": {
197
+ "type": "NameExpression",
198
+ "name": "Operation"
199
+ }
200
+ }
201
+ ]
202
+ },
203
+ "valid": true
204
+ },
152
205
  {
153
206
  "name": "sourceValue",
154
207
  "params": [
package/dist/index.cjs CHANGED
@@ -29,6 +29,7 @@ __export(src_exports, {
29
29
  field: () => import_language_common2.field,
30
30
  fields: () => import_language_common2.fields,
31
31
  fn: () => import_language_common2.fn,
32
+ fnIf: () => import_language_common2.fnIf,
32
33
  lastReferenceValue: () => import_language_common2.lastReferenceValue,
33
34
  merge: () => import_language_common2.merge,
34
35
  request: () => request,
@@ -48,6 +49,7 @@ __export(Adaptor_exports, {
48
49
  field: () => import_language_common2.field,
49
50
  fields: () => import_language_common2.fields,
50
51
  fn: () => import_language_common2.fn,
52
+ fnIf: () => import_language_common2.fnIf,
51
53
  lastReferenceValue: () => import_language_common2.lastReferenceValue,
52
54
  merge: () => import_language_common2.merge,
53
55
  request: () => request,
@@ -194,6 +196,7 @@ var src_default = Adaptor_exports;
194
196
  field,
195
197
  fields,
196
198
  fn,
199
+ fnIf,
197
200
  lastReferenceValue,
198
201
  merge,
199
202
  request,
package/dist/index.js CHANGED
@@ -16,6 +16,7 @@ __export(Adaptor_exports, {
16
16
  field: () => field,
17
17
  fields: () => fields,
18
18
  fn: () => fn,
19
+ fnIf: () => fnIf,
19
20
  lastReferenceValue: () => lastReferenceValue,
20
21
  merge: () => merge,
21
22
  request: () => request,
@@ -102,6 +103,7 @@ import {
102
103
  field,
103
104
  fields,
104
105
  fn,
106
+ fnIf,
105
107
  lastReferenceValue,
106
108
  merge,
107
109
  sourceValue
@@ -179,6 +181,7 @@ export {
179
181
  field,
180
182
  fields,
181
183
  fn,
184
+ fnIf,
182
185
  lastReferenceValue,
183
186
  merge,
184
187
  request,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfn/language-googlehealthcare",
3
- "version": "1.0.1",
3
+ "version": "1.1.0",
4
4
  "description": "A Google Health Care language package for use with Open Function",
5
5
  "type": "module",
6
6
  "exports": {
@@ -19,7 +19,7 @@
19
19
  "configuration-schema.json"
20
20
  ],
21
21
  "dependencies": {
22
- "@openfn/language-common": "^1.13.2"
22
+ "@openfn/language-common": "^1.14.0"
23
23
  },
24
24
  "devDependencies": {
25
25
  "@openfn/simple-ast": "0.4.1",
@@ -73,4 +73,4 @@ export function createFhirResource(fhirStore?: {
73
73
  fhirStoreId: string;
74
74
  }, resource: object, callback: Function): Operation;
75
75
  export { request } from "./Utils";
76
- export { dataPath, dataValue, dateFns, each, field, fields, fn, lastReferenceValue, merge, sourceValue } from "@openfn/language-common";
76
+ export { dataPath, dataValue, dateFns, each, field, fields, fn, fnIf, lastReferenceValue, merge, sourceValue } from "@openfn/language-common";