@openfn/language-maximo 0.5.0 → 0.5.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 +172 -37
- package/package.json +2 -2
- package/types/Adaptor.d.ts +3 -0
package/ast.json
CHANGED
|
@@ -1,5 +1,135 @@
|
|
|
1
1
|
{
|
|
2
|
-
"operations": [
|
|
2
|
+
"operations": [
|
|
3
|
+
{
|
|
4
|
+
"name": "fetch",
|
|
5
|
+
"params": [
|
|
6
|
+
"params"
|
|
7
|
+
],
|
|
8
|
+
"docs": {
|
|
9
|
+
"description": "Make a GET request and POST it somewhere else",
|
|
10
|
+
"tags": [
|
|
11
|
+
{
|
|
12
|
+
"title": "example",
|
|
13
|
+
"description": "fetch({\n endpoint: 'maxrest/rest/os/mxinventory',\n query: {\n ITEMNUM: '01226',\n _format: 'json',\n },\n postUrl: 'https://www.openfn.org/inbox/not-real',\n});"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"title": "function",
|
|
17
|
+
"description": null,
|
|
18
|
+
"name": null
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"title": "public",
|
|
22
|
+
"description": null,
|
|
23
|
+
"type": null
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"title": "param",
|
|
27
|
+
"description": "data to make the fetch",
|
|
28
|
+
"type": {
|
|
29
|
+
"type": "NameExpression",
|
|
30
|
+
"name": "object"
|
|
31
|
+
},
|
|
32
|
+
"name": "params"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"title": "returns",
|
|
36
|
+
"description": null,
|
|
37
|
+
"type": {
|
|
38
|
+
"type": "NameExpression",
|
|
39
|
+
"name": "Operation"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
"valid": true
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"name": "update",
|
|
48
|
+
"params": [
|
|
49
|
+
"params"
|
|
50
|
+
],
|
|
51
|
+
"docs": {
|
|
52
|
+
"description": "Make an update in Maximo 7.6 and beyond",
|
|
53
|
+
"tags": [
|
|
54
|
+
{
|
|
55
|
+
"title": "example",
|
|
56
|
+
"description": "execute(\n update(params)\n)(state)"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"title": "function",
|
|
60
|
+
"description": null,
|
|
61
|
+
"name": null
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"title": "public",
|
|
65
|
+
"description": null,
|
|
66
|
+
"type": null
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"title": "param",
|
|
70
|
+
"description": "data to make the update",
|
|
71
|
+
"type": {
|
|
72
|
+
"type": "NameExpression",
|
|
73
|
+
"name": "object"
|
|
74
|
+
},
|
|
75
|
+
"name": "params"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"title": "returns",
|
|
79
|
+
"description": null,
|
|
80
|
+
"type": {
|
|
81
|
+
"type": "NameExpression",
|
|
82
|
+
"name": "Operation"
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
]
|
|
86
|
+
},
|
|
87
|
+
"valid": true
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"name": "update75",
|
|
91
|
+
"params": [
|
|
92
|
+
"params"
|
|
93
|
+
],
|
|
94
|
+
"docs": {
|
|
95
|
+
"description": "Make an upadte in Maximo 7.5",
|
|
96
|
+
"tags": [
|
|
97
|
+
{
|
|
98
|
+
"title": "example",
|
|
99
|
+
"description": "execute(\n update75(params)\n)(state)"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"title": "function",
|
|
103
|
+
"description": null,
|
|
104
|
+
"name": null
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"title": "public",
|
|
108
|
+
"description": null,
|
|
109
|
+
"type": null
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"title": "param",
|
|
113
|
+
"description": "data to make the update",
|
|
114
|
+
"type": {
|
|
115
|
+
"type": "NameExpression",
|
|
116
|
+
"name": "object"
|
|
117
|
+
},
|
|
118
|
+
"name": "params"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"title": "returns",
|
|
122
|
+
"description": null,
|
|
123
|
+
"type": {
|
|
124
|
+
"type": "NameExpression",
|
|
125
|
+
"name": "Operation"
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
]
|
|
129
|
+
},
|
|
130
|
+
"valid": true
|
|
131
|
+
}
|
|
132
|
+
],
|
|
3
133
|
"exports": [],
|
|
4
134
|
"common": [
|
|
5
135
|
{
|
|
@@ -15,15 +145,15 @@
|
|
|
15
145
|
"description": null,
|
|
16
146
|
"type": null
|
|
17
147
|
},
|
|
18
|
-
{
|
|
19
|
-
"title": "example",
|
|
20
|
-
"description": "fn(state => {\n // do some things to state\n return state;\n});"
|
|
21
|
-
},
|
|
22
148
|
{
|
|
23
149
|
"title": "function",
|
|
24
150
|
"description": null,
|
|
25
151
|
"name": null
|
|
26
152
|
},
|
|
153
|
+
{
|
|
154
|
+
"title": "example",
|
|
155
|
+
"description": "fn(state => {\n // do some things to state\n return state;\n});"
|
|
156
|
+
},
|
|
27
157
|
{
|
|
28
158
|
"title": "param",
|
|
29
159
|
"description": "is the function",
|
|
@@ -59,15 +189,15 @@
|
|
|
59
189
|
"description": null,
|
|
60
190
|
"type": null
|
|
61
191
|
},
|
|
62
|
-
{
|
|
63
|
-
"title": "example",
|
|
64
|
-
"description": "fnIf((state) => state?.data?.name, get(\"https://example.com\"));"
|
|
65
|
-
},
|
|
66
192
|
{
|
|
67
193
|
"title": "function",
|
|
68
194
|
"description": null,
|
|
69
195
|
"name": null
|
|
70
196
|
},
|
|
197
|
+
{
|
|
198
|
+
"title": "example",
|
|
199
|
+
"description": "fnIf((state) => state?.data?.name, get(\"https://example.com\"));"
|
|
200
|
+
},
|
|
71
201
|
{
|
|
72
202
|
"title": "param",
|
|
73
203
|
"description": "The condition that returns true",
|
|
@@ -111,15 +241,15 @@
|
|
|
111
241
|
"description": null,
|
|
112
242
|
"type": null
|
|
113
243
|
},
|
|
114
|
-
{
|
|
115
|
-
"title": "example",
|
|
116
|
-
"description": "sourceValue('$.key')"
|
|
117
|
-
},
|
|
118
244
|
{
|
|
119
245
|
"title": "function",
|
|
120
246
|
"description": null,
|
|
121
247
|
"name": null
|
|
122
248
|
},
|
|
249
|
+
{
|
|
250
|
+
"title": "example",
|
|
251
|
+
"description": "sourceValue('$.key')"
|
|
252
|
+
},
|
|
123
253
|
{
|
|
124
254
|
"title": "param",
|
|
125
255
|
"description": "JSONPath referencing a point in `state`.",
|
|
@@ -154,15 +284,15 @@
|
|
|
154
284
|
"description": null,
|
|
155
285
|
"type": null
|
|
156
286
|
},
|
|
157
|
-
{
|
|
158
|
-
"title": "example",
|
|
159
|
-
"description": "dataPath('key')"
|
|
160
|
-
},
|
|
161
287
|
{
|
|
162
288
|
"title": "function",
|
|
163
289
|
"description": null,
|
|
164
290
|
"name": null
|
|
165
291
|
},
|
|
292
|
+
{
|
|
293
|
+
"title": "example",
|
|
294
|
+
"description": "dataPath('key')"
|
|
295
|
+
},
|
|
166
296
|
{
|
|
167
297
|
"title": "param",
|
|
168
298
|
"description": "JSONPath referencing a point in `data`.",
|
|
@@ -197,15 +327,15 @@
|
|
|
197
327
|
"description": null,
|
|
198
328
|
"type": null
|
|
199
329
|
},
|
|
200
|
-
{
|
|
201
|
-
"title": "example",
|
|
202
|
-
"description": "dataValue('key')"
|
|
203
|
-
},
|
|
204
330
|
{
|
|
205
331
|
"title": "function",
|
|
206
332
|
"description": null,
|
|
207
333
|
"name": null
|
|
208
334
|
},
|
|
335
|
+
{
|
|
336
|
+
"title": "example",
|
|
337
|
+
"description": "dataValue('key')"
|
|
338
|
+
},
|
|
209
339
|
{
|
|
210
340
|
"title": "param",
|
|
211
341
|
"description": "JSONPath referencing a point in `data`.",
|
|
@@ -240,15 +370,15 @@
|
|
|
240
370
|
"description": null,
|
|
241
371
|
"type": null
|
|
242
372
|
},
|
|
243
|
-
{
|
|
244
|
-
"title": "example",
|
|
245
|
-
"description": "lastReferenceValue('key')"
|
|
246
|
-
},
|
|
247
373
|
{
|
|
248
374
|
"title": "function",
|
|
249
375
|
"description": null,
|
|
250
376
|
"name": null
|
|
251
377
|
},
|
|
378
|
+
{
|
|
379
|
+
"title": "example",
|
|
380
|
+
"description": "lastReferenceValue('key')"
|
|
381
|
+
},
|
|
252
382
|
{
|
|
253
383
|
"title": "param",
|
|
254
384
|
"description": "JSONPath referencing a point in `references`.",
|
|
@@ -284,15 +414,15 @@
|
|
|
284
414
|
"description": null,
|
|
285
415
|
"type": null
|
|
286
416
|
},
|
|
287
|
-
{
|
|
288
|
-
"title": "example",
|
|
289
|
-
"description": "each(\"$.[*]\",\n create(\"SObject\",\n field(\"FirstName\", sourceValue(\"$.firstName\"))\n )\n)"
|
|
290
|
-
},
|
|
291
417
|
{
|
|
292
418
|
"title": "function",
|
|
293
419
|
"description": null,
|
|
294
420
|
"name": null
|
|
295
421
|
},
|
|
422
|
+
{
|
|
423
|
+
"title": "example",
|
|
424
|
+
"description": "each(\"$.[*]\",\n create(\"SObject\",\n field(\"FirstName\", sourceValue(\"$.firstName\"))\n )\n)"
|
|
425
|
+
},
|
|
296
426
|
{
|
|
297
427
|
"title": "param",
|
|
298
428
|
"description": "JSONPath referencing a point in `state`.",
|
|
@@ -337,15 +467,15 @@
|
|
|
337
467
|
"description": null,
|
|
338
468
|
"type": null
|
|
339
469
|
},
|
|
340
|
-
{
|
|
341
|
-
"title": "example",
|
|
342
|
-
"description": "field('destination_field_name__c', 'value')"
|
|
343
|
-
},
|
|
344
470
|
{
|
|
345
471
|
"title": "function",
|
|
346
472
|
"description": null,
|
|
347
473
|
"name": null
|
|
348
474
|
},
|
|
475
|
+
{
|
|
476
|
+
"title": "example",
|
|
477
|
+
"description": "field('destination_field_name__c', 'value')"
|
|
478
|
+
},
|
|
349
479
|
{
|
|
350
480
|
"title": "param",
|
|
351
481
|
"description": "Name of the field",
|
|
@@ -389,15 +519,15 @@
|
|
|
389
519
|
"description": null,
|
|
390
520
|
"type": null
|
|
391
521
|
},
|
|
392
|
-
{
|
|
393
|
-
"title": "example",
|
|
394
|
-
"description": "fields(list_of_fields)"
|
|
395
|
-
},
|
|
396
522
|
{
|
|
397
523
|
"title": "function",
|
|
398
524
|
"description": null,
|
|
399
525
|
"name": null
|
|
400
526
|
},
|
|
527
|
+
{
|
|
528
|
+
"title": "example",
|
|
529
|
+
"description": "fields(list_of_fields)"
|
|
530
|
+
},
|
|
401
531
|
{
|
|
402
532
|
"title": "param",
|
|
403
533
|
"description": "a list of fields",
|
|
@@ -442,6 +572,11 @@
|
|
|
442
572
|
"description": null,
|
|
443
573
|
"name": null
|
|
444
574
|
},
|
|
575
|
+
{
|
|
576
|
+
"title": "public",
|
|
577
|
+
"description": null,
|
|
578
|
+
"type": null
|
|
579
|
+
},
|
|
445
580
|
{
|
|
446
581
|
"title": "param",
|
|
447
582
|
"description": null,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openfn/language-maximo",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "An IBM Maximo EAM Language Pack for OpenFn",
|
|
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.
|
|
15
|
+
"@openfn/language-common": "^1.15.1",
|
|
16
16
|
"base-64": "^0.1.0",
|
|
17
17
|
"request": "^2.88.2",
|
|
18
18
|
"utf8": "^2.1.2"
|
package/types/Adaptor.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export function execute(...operations: Operations): Operation;
|
|
|
23
23
|
* postUrl: 'https://www.openfn.org/inbox/not-real',
|
|
24
24
|
* });
|
|
25
25
|
* @function
|
|
26
|
+
* @public
|
|
26
27
|
* @param {object} params - data to make the fetch
|
|
27
28
|
* @returns {Operation}
|
|
28
29
|
*/
|
|
@@ -35,6 +36,7 @@ export function create(params: any): (state: any) => Promise<any>;
|
|
|
35
36
|
* update(params)
|
|
36
37
|
* )(state)
|
|
37
38
|
* @function
|
|
39
|
+
* @public
|
|
38
40
|
* @param {object} params - data to make the update
|
|
39
41
|
* @returns {Operation}
|
|
40
42
|
*/
|
|
@@ -46,6 +48,7 @@ export function update(params: object): Operation;
|
|
|
46
48
|
* update75(params)
|
|
47
49
|
* )(state)
|
|
48
50
|
* @function
|
|
51
|
+
* @public
|
|
49
52
|
* @param {object} params - data to make the update
|
|
50
53
|
* @returns {Operation}
|
|
51
54
|
*/
|