@openfn/language-mpesa 1.0.4 → 1.1.1
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 +54 -0
- package/dist/index.cjs +3 -0
- package/dist/index.js +4 -1
- package/package.json +3 -3
- package/types/Adaptor.d.ts +1 -1
package/ast.json
CHANGED
|
@@ -889,6 +889,60 @@
|
|
|
889
889
|
]
|
|
890
890
|
},
|
|
891
891
|
"valid": false
|
|
892
|
+
},
|
|
893
|
+
{
|
|
894
|
+
"name": "as",
|
|
895
|
+
"params": [
|
|
896
|
+
"key",
|
|
897
|
+
"operation"
|
|
898
|
+
],
|
|
899
|
+
"docs": {
|
|
900
|
+
"description": "Run an operation and save the result to a custom key in state instead of overwriting state.data.",
|
|
901
|
+
"tags": [
|
|
902
|
+
{
|
|
903
|
+
"title": "public",
|
|
904
|
+
"description": null,
|
|
905
|
+
"type": null
|
|
906
|
+
},
|
|
907
|
+
{
|
|
908
|
+
"title": "function",
|
|
909
|
+
"description": null,
|
|
910
|
+
"name": null
|
|
911
|
+
},
|
|
912
|
+
{
|
|
913
|
+
"title": "example",
|
|
914
|
+
"description": "as('cceData', collections.get('cce-data-dhis2', { key: `*:*:${$.syncedAt}*` }));",
|
|
915
|
+
"caption": "Fetch cce-data from collections and store them under state.cceData"
|
|
916
|
+
},
|
|
917
|
+
{
|
|
918
|
+
"title": "param",
|
|
919
|
+
"description": "The state key to assign the result of the operation to.",
|
|
920
|
+
"type": {
|
|
921
|
+
"type": "NameExpression",
|
|
922
|
+
"name": "string"
|
|
923
|
+
},
|
|
924
|
+
"name": "key"
|
|
925
|
+
},
|
|
926
|
+
{
|
|
927
|
+
"title": "param",
|
|
928
|
+
"description": " An operation that returns a new state object with a `data` property",
|
|
929
|
+
"type": {
|
|
930
|
+
"type": "NameExpression",
|
|
931
|
+
"name": "function"
|
|
932
|
+
},
|
|
933
|
+
"name": "operation"
|
|
934
|
+
},
|
|
935
|
+
{
|
|
936
|
+
"title": "returns",
|
|
937
|
+
"description": null,
|
|
938
|
+
"type": {
|
|
939
|
+
"type": "NameExpression",
|
|
940
|
+
"name": "Operation"
|
|
941
|
+
}
|
|
942
|
+
}
|
|
943
|
+
]
|
|
944
|
+
},
|
|
945
|
+
"valid": true
|
|
892
946
|
}
|
|
893
947
|
]
|
|
894
948
|
}
|
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
|
+
as: () => import_language_common2.as,
|
|
28
29
|
buyGoods: () => buyGoods,
|
|
29
30
|
checkTransactionStatus: () => checkTransactionStatus,
|
|
30
31
|
cursor: () => import_language_common2.cursor,
|
|
@@ -49,6 +50,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
49
50
|
// src/Adaptor.js
|
|
50
51
|
var Adaptor_exports = {};
|
|
51
52
|
__export(Adaptor_exports, {
|
|
53
|
+
as: () => import_language_common2.as,
|
|
52
54
|
buyGoods: () => buyGoods,
|
|
53
55
|
checkTransactionStatus: () => checkTransactionStatus,
|
|
54
56
|
cursor: () => import_language_common2.cursor,
|
|
@@ -217,6 +219,7 @@ function request2(method, path, body, options = {}) {
|
|
|
217
219
|
var src_default = Adaptor_exports;
|
|
218
220
|
// Annotate the CommonJS export names for ESM import in node:
|
|
219
221
|
0 && (module.exports = {
|
|
222
|
+
as,
|
|
220
223
|
buyGoods,
|
|
221
224
|
checkTransactionStatus,
|
|
222
225
|
cursor,
|
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
|
+
as: () => as,
|
|
10
11
|
buyGoods: () => buyGoods,
|
|
11
12
|
checkTransactionStatus: () => checkTransactionStatus,
|
|
12
13
|
cursor: () => cursor,
|
|
@@ -100,7 +101,8 @@ import {
|
|
|
100
101
|
fn,
|
|
101
102
|
lastReferenceValue,
|
|
102
103
|
merge,
|
|
103
|
-
sourceValue
|
|
104
|
+
sourceValue,
|
|
105
|
+
as
|
|
104
106
|
} from "@openfn/language-common";
|
|
105
107
|
function stkPush(data, options = {}) {
|
|
106
108
|
return async (state) => {
|
|
@@ -190,6 +192,7 @@ function request2(method, path, body, options = {}) {
|
|
|
190
192
|
// src/index.js
|
|
191
193
|
var src_default = Adaptor_exports;
|
|
192
194
|
export {
|
|
195
|
+
as,
|
|
193
196
|
buyGoods,
|
|
194
197
|
checkTransactionStatus,
|
|
195
198
|
cursor,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openfn/language-mpesa",
|
|
3
3
|
"label": "Mpesa",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.1.1",
|
|
5
5
|
"description": "OpenFn mpesa adaptor",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"configuration-schema.json"
|
|
22
22
|
],
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@openfn/language-common": "
|
|
24
|
+
"@openfn/language-common": "3.0.1"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"assertion-error": "2.0.0",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"deep-eql": "4.1.1",
|
|
30
30
|
"mocha": "^10.7.3",
|
|
31
31
|
"rimraf": "3.0.2",
|
|
32
|
-
"undici": "^5.
|
|
32
|
+
"undici": "^5.29.0"
|
|
33
33
|
},
|
|
34
34
|
"repository": {
|
|
35
35
|
"type": "git",
|
package/types/Adaptor.d.ts
CHANGED
|
@@ -239,4 +239,4 @@ export type RemitTaxObject = any;
|
|
|
239
239
|
* Buy goods parameter definition
|
|
240
240
|
*/
|
|
241
241
|
export type BuyGoodsObject = any;
|
|
242
|
-
export { dataPath, dataValue, dateFns, cursor, each, field, fields, fn, lastReferenceValue, merge, sourceValue } from "@openfn/language-common";
|
|
242
|
+
export { dataPath, dataValue, dateFns, cursor, each, field, fields, fn, lastReferenceValue, merge, sourceValue, as } from "@openfn/language-common";
|