@openfn/language-beyonic 0.1.3 → 0.1.4

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
@@ -32,6 +32,14 @@
32
32
  "name": "Function"
33
33
  },
34
34
  "name": "func"
35
+ },
36
+ {
37
+ "title": "returns",
38
+ "description": null,
39
+ "type": {
40
+ "type": "NameExpression",
41
+ "name": "Operation"
42
+ }
35
43
  }
36
44
  ]
37
45
  },
@@ -67,6 +75,14 @@
67
75
  "name": "String"
68
76
  },
69
77
  "name": "path"
78
+ },
79
+ {
80
+ "title": "returns",
81
+ "description": null,
82
+ "type": {
83
+ "type": "NameExpression",
84
+ "name": "Operation"
85
+ }
70
86
  }
71
87
  ]
72
88
  },
@@ -145,6 +161,14 @@
145
161
  "name": "String"
146
162
  },
147
163
  "name": "path"
164
+ },
165
+ {
166
+ "title": "returns",
167
+ "description": null,
168
+ "type": {
169
+ "type": "NameExpression",
170
+ "name": "Operation"
171
+ }
148
172
  }
149
173
  ]
150
174
  },
@@ -180,6 +204,14 @@
180
204
  "name": "String"
181
205
  },
182
206
  "name": "path"
207
+ },
208
+ {
209
+ "title": "returns",
210
+ "description": null,
211
+ "type": {
212
+ "type": "NameExpression",
213
+ "name": "Operation"
214
+ }
183
215
  }
184
216
  ]
185
217
  },
@@ -225,6 +257,14 @@
225
257
  "name": "Value"
226
258
  },
227
259
  "name": "value"
260
+ },
261
+ {
262
+ "title": "returns",
263
+ "description": null,
264
+ "type": {
265
+ "type": "NameExpression",
266
+ "name": "Field"
267
+ }
228
268
  }
229
269
  ]
230
270
  },
package/dist/index.cjs CHANGED
@@ -25,8 +25,19 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
25
25
  // src/index.js
26
26
  var src_exports = {};
27
27
  __export(src_exports, {
28
- Adaptor: () => Adaptor_exports,
29
- default: () => src_default
28
+ createCollectionRequest: () => createCollectionRequest,
29
+ createContact: () => createContact,
30
+ createPayment: () => createPayment,
31
+ dataPath: () => import_language_common2.dataPath,
32
+ dataValue: () => import_language_common2.dataValue,
33
+ default: () => src_default,
34
+ execute: () => execute,
35
+ field: () => import_language_common2.field,
36
+ fields: () => import_language_common2.fields,
37
+ fn: () => import_language_common2.fn,
38
+ lastReferenceValue: () => import_language_common2.lastReferenceValue,
39
+ merge: () => import_language_common2.merge,
40
+ sourceValue: () => import_language_common2.sourceValue
30
41
  });
31
42
  module.exports = __toCommonJS(src_exports);
32
43
 
@@ -117,5 +128,16 @@ function createCollectionRequest(data) {
117
128
  var src_default = Adaptor_exports;
118
129
  // Annotate the CommonJS export names for ESM import in node:
119
130
  0 && (module.exports = {
120
- Adaptor
131
+ createCollectionRequest,
132
+ createContact,
133
+ createPayment,
134
+ dataPath,
135
+ dataValue,
136
+ execute,
137
+ field,
138
+ fields,
139
+ fn,
140
+ lastReferenceValue,
141
+ merge,
142
+ sourceValue
121
143
  });
package/dist/index.js CHANGED
@@ -102,6 +102,17 @@ function createCollectionRequest(data) {
102
102
  // src/index.js
103
103
  var src_default = Adaptor_exports;
104
104
  export {
105
- Adaptor_exports as Adaptor,
106
- src_default as default
105
+ createCollectionRequest,
106
+ createContact,
107
+ createPayment,
108
+ dataPath,
109
+ dataValue,
110
+ src_default as default,
111
+ execute,
112
+ field,
113
+ fields,
114
+ fn,
115
+ lastReferenceValue,
116
+ merge,
117
+ sourceValue
107
118
  };
package/package.json CHANGED
@@ -1,13 +1,16 @@
1
1
  {
2
2
  "name": "@openfn/language-beyonic",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "beyonic Language Pack for OpenFn",
5
5
  "homepage": "https://docs.openfn.org",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "https://github.com/openfn/adaptors.git"
9
9
  },
10
- "main": "dist/index.cjs",
10
+ "exports": {
11
+ "import": "./dist/index.js",
12
+ "require": "./dist/index.cjs"
13
+ },
11
14
  "author": "Open Function Group",
12
15
  "license": "LGPLv3",
13
16
  "files": [
@@ -17,29 +20,29 @@
17
20
  "configuration-schema.json"
18
21
  ],
19
22
  "dependencies": {
23
+ "@openfn/language-common": "^1.7.4",
20
24
  "JSONPath": "^0.10.0",
21
- "@openfn/language-common": "^1.7.1",
22
25
  "lodash-fp": "^0.10.2",
23
26
  "superagent": "^8.0.0"
24
27
  },
25
28
  "devDependencies": {
29
+ "@openfn/buildtools": "^1.0.2",
26
30
  "@openfn/simple-ast": "0.4.1",
27
31
  "assertion-error": "2.0.0",
28
32
  "chai": "4.3.6",
29
33
  "deep-eql": "4.1.1",
34
+ "esno": "^0.16.3",
30
35
  "mocha": "7.2.0",
31
- "sinon": "9.2.4",
32
- "esno": "0.16.3",
33
- "rimraf": "3.0.2",
34
- "@openfn/buildtools": "^1.0.0"
36
+ "rimraf": "3.0.2"
35
37
  },
36
38
  "type": "module",
37
39
  "types": "types/index.d.ts",
40
+ "main": "dist/index.cjs",
38
41
  "scripts": {
39
42
  "build": "pnpm clean && build-adaptor beyonic",
40
43
  "test": "mocha --experimental-specifier-resolution=node --no-warnings",
41
44
  "test:watch": "mocha -w --experimental-specifier-resolution=node --no-warnings",
42
- "clean": "rm -rf dist types docs",
45
+ "clean": "rimraf dist types docs",
43
46
  "pack": "pnpm pack --pack-destination ../../dist"
44
47
  }
45
48
  }
@@ -0,0 +1,103 @@
1
+ /** @module Adaptor */
2
+ /**
3
+ * Execute a sequence of operations.
4
+ * Wraps `language-common/execute`, and prepends initial state for beyonic.
5
+ * @example
6
+ * execute(
7
+ * create('foo'),
8
+ * delete('bar')
9
+ * )(state)
10
+ * @constructor
11
+ * @param {Operations} operations - Operations to be performed.
12
+ * @returns {Operation}
13
+ */
14
+ export function execute(...operations: Operations): Operation;
15
+ export class execute {
16
+ /** @module Adaptor */
17
+ /**
18
+ * Execute a sequence of operations.
19
+ * Wraps `language-common/execute`, and prepends initial state for beyonic.
20
+ * @example
21
+ * execute(
22
+ * create('foo'),
23
+ * delete('bar')
24
+ * )(state)
25
+ * @constructor
26
+ * @param {Operations} operations - Operations to be performed.
27
+ * @returns {Operation}
28
+ */
29
+ constructor(...operations: Operations);
30
+ }
31
+ /**
32
+ * Create a payment
33
+ * @example
34
+ * execute(
35
+ * createPayment(data)
36
+ * )(state)
37
+ * @constructor
38
+ * @param {object} data - Payload data for the payment
39
+ * @returns {Operation}
40
+ */
41
+ export function createPayment(data: object): Operation;
42
+ export class createPayment {
43
+ /**
44
+ * Create a payment
45
+ * @example
46
+ * execute(
47
+ * createPayment(data)
48
+ * )(state)
49
+ * @constructor
50
+ * @param {object} data - Payload data for the payment
51
+ * @returns {Operation}
52
+ */
53
+ constructor(data: object);
54
+ }
55
+ /**
56
+ * Create a contact
57
+ * @example
58
+ * execute(
59
+ * createContact(data)
60
+ * )(state)
61
+ * @constructor
62
+ * @param {object} data - Payload data for the contact
63
+ * @returns {Operation}
64
+ */
65
+ export function createContact(data: object): Operation;
66
+ export class createContact {
67
+ /**
68
+ * Create a contact
69
+ * @example
70
+ * execute(
71
+ * createContact(data)
72
+ * )(state)
73
+ * @constructor
74
+ * @param {object} data - Payload data for the contact
75
+ * @returns {Operation}
76
+ */
77
+ constructor(data: object);
78
+ }
79
+ /**
80
+ * Create a collection request
81
+ * @example
82
+ * execute(
83
+ * createCollectionRequest(data)
84
+ * )(state)
85
+ * @constructor
86
+ * @param {object} data - Payload data for the collection request
87
+ * @returns {Operation}
88
+ */
89
+ export function createCollectionRequest(data: object): Operation;
90
+ export class createCollectionRequest {
91
+ /**
92
+ * Create a collection request
93
+ * @example
94
+ * execute(
95
+ * createCollectionRequest(data)
96
+ * )(state)
97
+ * @constructor
98
+ * @param {object} data - Payload data for the collection request
99
+ * @returns {Operation}
100
+ */
101
+ constructor(data: object);
102
+ }
103
+ export { fn, field, fields, sourceValue, merge, dataPath, dataValue, lastReferenceValue } from "@openfn/language-common";
@@ -0,0 +1,5 @@
1
+ export function post({ apiToken, body, url }: {
2
+ apiToken: any;
3
+ body: any;
4
+ url: any;
5
+ }): Promise<any>;
package/types/index.d.ts CHANGED
@@ -1,121 +1,3 @@
1
- /** @module Adaptor */
2
- /**
3
- * Execute a sequence of operations.
4
- * Wraps `language-common/execute`, and prepends initial state for beyonic.
5
- * @example
6
- * execute(
7
- * create('foo'),
8
- * delete('bar')
9
- * )(state)
10
- * @constructor
11
- * @param {Operations} operations - Operations to be performed.
12
- * @returns {Operation}
13
- */
14
- declare function execute(...operations: Operations): Operation;
15
- declare class execute {
16
- /** @module Adaptor */
17
- /**
18
- * Execute a sequence of operations.
19
- * Wraps `language-common/execute`, and prepends initial state for beyonic.
20
- * @example
21
- * execute(
22
- * create('foo'),
23
- * delete('bar')
24
- * )(state)
25
- * @constructor
26
- * @param {Operations} operations - Operations to be performed.
27
- * @returns {Operation}
28
- */
29
- constructor(...operations: Operations);
30
- }
31
- /**
32
- * Create a payment
33
- * @example
34
- * execute(
35
- * createPayment(data)
36
- * )(state)
37
- * @constructor
38
- * @param {object} data - Payload data for the payment
39
- * @returns {Operation}
40
- */
41
- declare function createPayment(data: object): Operation;
42
- declare class createPayment {
43
- /**
44
- * Create a payment
45
- * @example
46
- * execute(
47
- * createPayment(data)
48
- * )(state)
49
- * @constructor
50
- * @param {object} data - Payload data for the payment
51
- * @returns {Operation}
52
- */
53
- constructor(data: object);
54
- }
55
- /**
56
- * Create a contact
57
- * @example
58
- * execute(
59
- * createContact(data)
60
- * )(state)
61
- * @constructor
62
- * @param {object} data - Payload data for the contact
63
- * @returns {Operation}
64
- */
65
- declare function createContact(data: object): Operation;
66
- declare class createContact {
67
- /**
68
- * Create a contact
69
- * @example
70
- * execute(
71
- * createContact(data)
72
- * )(state)
73
- * @constructor
74
- * @param {object} data - Payload data for the contact
75
- * @returns {Operation}
76
- */
77
- constructor(data: object);
78
- }
79
- /**
80
- * Create a collection request
81
- * @example
82
- * execute(
83
- * createCollectionRequest(data)
84
- * )(state)
85
- * @constructor
86
- * @param {object} data - Payload data for the collection request
87
- * @returns {Operation}
88
- */
89
- declare function createCollectionRequest(data: object): Operation;
90
- declare class createCollectionRequest {
91
- /**
92
- * Create a collection request
93
- * @example
94
- * execute(
95
- * createCollectionRequest(data)
96
- * )(state)
97
- * @constructor
98
- * @param {object} data - Payload data for the collection request
99
- * @returns {Operation}
100
- */
101
- constructor(data: object);
102
- }
103
-
104
- type Adaptor_execute = execute;
105
- declare const Adaptor_execute: typeof execute;
106
- type Adaptor_createPayment = createPayment;
107
- declare const Adaptor_createPayment: typeof createPayment;
108
- type Adaptor_createContact = createContact;
109
- declare const Adaptor_createContact: typeof createContact;
110
- type Adaptor_createCollectionRequest = createCollectionRequest;
111
- declare const Adaptor_createCollectionRequest: typeof createCollectionRequest;
112
- declare namespace Adaptor {
113
- export {
114
- Adaptor_execute as execute,
115
- Adaptor_createPayment as createPayment,
116
- Adaptor_createContact as createContact,
117
- Adaptor_createCollectionRequest as createCollectionRequest,
118
- };
119
- }
120
-
121
- export { Adaptor, Adaptor as default };
1
+ export default Adaptor;
2
+ export * from "./Adaptor";
3
+ import * as Adaptor from "./Adaptor";