@openfn/language-beyonic 0.3.30 → 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
@@ -403,6 +403,49 @@
403
403
  },
404
404
  "valid": true
405
405
  },
406
+ {
407
+ "name": "combine",
408
+ "params": [
409
+ "operations"
410
+ ],
411
+ "docs": {
412
+ "description": "Combines two operations into one",
413
+ "tags": [
414
+ {
415
+ "title": "public",
416
+ "description": null,
417
+ "type": null
418
+ },
419
+ {
420
+ "title": "function",
421
+ "description": null,
422
+ "name": null
423
+ },
424
+ {
425
+ "title": "example",
426
+ "description": "combine(\n create('foo'),\n delete('bar')\n)"
427
+ },
428
+ {
429
+ "title": "param",
430
+ "description": "Operations to be performed.",
431
+ "type": {
432
+ "type": "NameExpression",
433
+ "name": "Operations"
434
+ },
435
+ "name": "operations"
436
+ },
437
+ {
438
+ "title": "returns",
439
+ "description": null,
440
+ "type": {
441
+ "type": "NameExpression",
442
+ "name": "Operation"
443
+ }
444
+ }
445
+ ]
446
+ },
447
+ "valid": true
448
+ },
406
449
  {
407
450
  "name": "field",
408
451
  "params": [
@@ -556,6 +599,55 @@
556
599
  ]
557
600
  },
558
601
  "valid": true
602
+ },
603
+ {
604
+ "name": "log",
605
+ "params": [
606
+ "args"
607
+ ],
608
+ "docs": {
609
+ "description": "Outputs a message, like calling `console.log`. Use this at the top level of your job code, but not inside callbacks.",
610
+ "tags": [
611
+ {
612
+ "title": "public",
613
+ "description": null,
614
+ "type": null
615
+ },
616
+ {
617
+ "title": "function",
618
+ "description": null,
619
+ "name": null
620
+ },
621
+ {
622
+ "title": "example",
623
+ "description": "log('Patient List::', $.patients);",
624
+ "caption": "Log values from state"
625
+ },
626
+ {
627
+ "title": "example",
628
+ "description": "fn((state) => {\n console.log(state.data);\n return state;\n})",
629
+ "caption": "Use console.log inside a callback or fn block"
630
+ },
631
+ {
632
+ "title": "param",
633
+ "description": "A value or message to display in the logs",
634
+ "type": {
635
+ "type": "NameExpression",
636
+ "name": "any"
637
+ },
638
+ "name": "args"
639
+ },
640
+ {
641
+ "title": "returns",
642
+ "description": null,
643
+ "type": {
644
+ "type": "NameExpression",
645
+ "name": "Operation"
646
+ }
647
+ }
648
+ ]
649
+ },
650
+ "valid": true
559
651
  }
560
652
  ]
561
653
  }
package/dist/index.cjs CHANGED
@@ -25,6 +25,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
25
25
  // src/index.js
26
26
  var src_exports = {};
27
27
  __export(src_exports, {
28
+ combine: () => import_language_common2.combine,
28
29
  createCollectionRequest: () => createCollectionRequest,
29
30
  createContact: () => createContact,
30
31
  createPayment: () => createPayment,
@@ -37,6 +38,7 @@ __export(src_exports, {
37
38
  fn: () => import_language_common2.fn,
38
39
  fnIf: () => import_language_common2.fnIf,
39
40
  lastReferenceValue: () => import_language_common2.lastReferenceValue,
41
+ log: () => import_language_common2.log,
40
42
  merge: () => import_language_common2.merge,
41
43
  sourceValue: () => import_language_common2.sourceValue
42
44
  });
@@ -45,6 +47,7 @@ module.exports = __toCommonJS(src_exports);
45
47
  // src/Adaptor.js
46
48
  var Adaptor_exports = {};
47
49
  __export(Adaptor_exports, {
50
+ combine: () => import_language_common2.combine,
48
51
  createCollectionRequest: () => createCollectionRequest,
49
52
  createContact: () => createContact,
50
53
  createPayment: () => createPayment,
@@ -56,6 +59,7 @@ __export(Adaptor_exports, {
56
59
  fn: () => import_language_common2.fn,
57
60
  fnIf: () => import_language_common2.fnIf,
58
61
  lastReferenceValue: () => import_language_common2.lastReferenceValue,
62
+ log: () => import_language_common2.log,
59
63
  merge: () => import_language_common2.merge,
60
64
  sourceValue: () => import_language_common2.sourceValue
61
65
  });
@@ -131,6 +135,7 @@ function createCollectionRequest(data) {
131
135
  var src_default = Adaptor_exports;
132
136
  // Annotate the CommonJS export names for ESM import in node:
133
137
  0 && (module.exports = {
138
+ combine,
134
139
  createCollectionRequest,
135
140
  createContact,
136
141
  createPayment,
@@ -142,6 +147,7 @@ var src_default = Adaptor_exports;
142
147
  fn,
143
148
  fnIf,
144
149
  lastReferenceValue,
150
+ log,
145
151
  merge,
146
152
  sourceValue
147
153
  });
package/dist/index.js CHANGED
@@ -7,6 +7,7 @@ var __export = (target, all) => {
7
7
  // src/Adaptor.js
8
8
  var Adaptor_exports = {};
9
9
  __export(Adaptor_exports, {
10
+ combine: () => combine,
10
11
  createCollectionRequest: () => createCollectionRequest,
11
12
  createContact: () => createContact,
12
13
  createPayment: () => createPayment,
@@ -18,6 +19,7 @@ __export(Adaptor_exports, {
18
19
  fn: () => fn,
19
20
  fnIf: () => fnIf,
20
21
  lastReferenceValue: () => lastReferenceValue,
22
+ log: () => log,
21
23
  merge: () => merge,
22
24
  sourceValue: () => sourceValue
23
25
  });
@@ -40,15 +42,17 @@ function post({ apiToken, body, url }) {
40
42
  import { resolve as resolveUrl } from "url";
41
43
  import { expandReferences } from "@openfn/language-common/util";
42
44
  import {
43
- fn,
44
- fnIf,
45
+ combine,
46
+ dataPath,
47
+ dataValue,
45
48
  field,
46
49
  fields,
47
- sourceValue,
50
+ fn,
51
+ fnIf,
52
+ lastReferenceValue,
53
+ log,
48
54
  merge,
49
- dataPath,
50
- dataValue,
51
- lastReferenceValue
55
+ sourceValue
52
56
  } from "@openfn/language-common";
53
57
  function execute(...operations) {
54
58
  const initialState = {
@@ -102,6 +106,7 @@ function createCollectionRequest(data) {
102
106
  // src/index.js
103
107
  var src_default = Adaptor_exports;
104
108
  export {
109
+ combine,
105
110
  createCollectionRequest,
106
111
  createContact,
107
112
  createPayment,
@@ -114,6 +119,7 @@ export {
114
119
  fn,
115
120
  fnIf,
116
121
  lastReferenceValue,
122
+ log,
117
123
  merge,
118
124
  sourceValue
119
125
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@openfn/language-beyonic",
3
3
  "label": "Beyonic",
4
- "version": "0.3.30",
4
+ "version": "0.4.0",
5
5
  "description": "OpenFn adaptor for Beyonic",
6
6
  "homepage": "https://docs.openfn.org",
7
7
  "repository": {
@@ -36,4 +36,4 @@ export function createContact(data: object): Operation;
36
36
  * @returns {Operation}
37
37
  */
38
38
  export function createCollectionRequest(data: object): Operation;
39
- export { fn, fnIf, field, fields, sourceValue, merge, dataPath, dataValue, lastReferenceValue } from "@openfn/language-common";
39
+ export { combine, dataPath, dataValue, field, fields, fn, fnIf, lastReferenceValue, log, merge, sourceValue } from "@openfn/language-common";