@openfn/language-mailchimp 1.0.32 → 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
@@ -1201,6 +1201,49 @@
1201
1201
  },
1202
1202
  "valid": true
1203
1203
  },
1204
+ {
1205
+ "name": "combine",
1206
+ "params": [
1207
+ "operations"
1208
+ ],
1209
+ "docs": {
1210
+ "description": "Combines two operations into one",
1211
+ "tags": [
1212
+ {
1213
+ "title": "public",
1214
+ "description": null,
1215
+ "type": null
1216
+ },
1217
+ {
1218
+ "title": "function",
1219
+ "description": null,
1220
+ "name": null
1221
+ },
1222
+ {
1223
+ "title": "example",
1224
+ "description": "combine(\n create('foo'),\n delete('bar')\n)"
1225
+ },
1226
+ {
1227
+ "title": "param",
1228
+ "description": "Operations to be performed.",
1229
+ "type": {
1230
+ "type": "NameExpression",
1231
+ "name": "Operations"
1232
+ },
1233
+ "name": "operations"
1234
+ },
1235
+ {
1236
+ "title": "returns",
1237
+ "description": null,
1238
+ "type": {
1239
+ "type": "NameExpression",
1240
+ "name": "Operation"
1241
+ }
1242
+ }
1243
+ ]
1244
+ },
1245
+ "valid": true
1246
+ },
1204
1247
  {
1205
1248
  "name": "field",
1206
1249
  "params": [
@@ -1407,6 +1450,55 @@
1407
1450
  ]
1408
1451
  },
1409
1452
  "valid": true
1453
+ },
1454
+ {
1455
+ "name": "log",
1456
+ "params": [
1457
+ "args"
1458
+ ],
1459
+ "docs": {
1460
+ "description": "Outputs a message, like calling `console.log`. Use this at the top level of your job code, but not inside callbacks.",
1461
+ "tags": [
1462
+ {
1463
+ "title": "public",
1464
+ "description": null,
1465
+ "type": null
1466
+ },
1467
+ {
1468
+ "title": "function",
1469
+ "description": null,
1470
+ "name": null
1471
+ },
1472
+ {
1473
+ "title": "example",
1474
+ "description": "log('Patient List::', $.patients);",
1475
+ "caption": "Log values from state"
1476
+ },
1477
+ {
1478
+ "title": "example",
1479
+ "description": "fn((state) => {\n console.log(state.data);\n return state;\n})",
1480
+ "caption": "Use console.log inside a callback or fn block"
1481
+ },
1482
+ {
1483
+ "title": "param",
1484
+ "description": "A value or message to display in the logs",
1485
+ "type": {
1486
+ "type": "NameExpression",
1487
+ "name": "any"
1488
+ },
1489
+ "name": "args"
1490
+ },
1491
+ {
1492
+ "title": "returns",
1493
+ "description": null,
1494
+ "type": {
1495
+ "type": "NameExpression",
1496
+ "name": "Operation"
1497
+ }
1498
+ }
1499
+ ]
1500
+ },
1501
+ "valid": true
1410
1502
  }
1411
1503
  ]
1412
1504
  }
package/dist/index.cjs CHANGED
@@ -30,6 +30,7 @@ __export(src_exports, {
30
30
  archiveMember: () => archiveMember,
31
31
  axios: () => import_axios.default,
32
32
  chunk: () => import_language_common3.chunk,
33
+ combine: () => import_language_common3.combine,
33
34
  dataPath: () => import_language_common3.dataPath,
34
35
  dataValue: () => import_language_common3.dataValue,
35
36
  default: () => src_default,
@@ -46,6 +47,7 @@ __export(src_exports, {
46
47
  listAudiences: () => listAudiences,
47
48
  listBatches: () => listBatches,
48
49
  listMembers: () => listMembers,
50
+ log: () => import_language_common3.log,
49
51
  md5: () => import_md5.default,
50
52
  merge: () => import_language_common3.merge,
51
53
  post: () => post,
@@ -67,6 +69,7 @@ __export(Adaptor_exports, {
67
69
  archiveMember: () => archiveMember,
68
70
  axios: () => import_axios.default,
69
71
  chunk: () => import_language_common3.chunk,
72
+ combine: () => import_language_common3.combine,
70
73
  dataPath: () => import_language_common3.dataPath,
71
74
  dataValue: () => import_language_common3.dataValue,
72
75
  deleteMember: () => deleteMember,
@@ -82,6 +85,7 @@ __export(Adaptor_exports, {
82
85
  listAudiences: () => listAudiences,
83
86
  listBatches: () => listBatches,
84
87
  listMembers: () => listMembers,
88
+ log: () => import_language_common3.log,
85
89
  md5: () => import_md5.default,
86
90
  merge: () => import_language_common3.merge,
87
91
  post: () => post,
@@ -334,6 +338,7 @@ var src_default = Adaptor_exports;
334
338
  archiveMember,
335
339
  axios,
336
340
  chunk,
341
+ combine,
337
342
  dataPath,
338
343
  dataValue,
339
344
  deleteMember,
@@ -349,6 +354,7 @@ var src_default = Adaptor_exports;
349
354
  listAudiences,
350
355
  listBatches,
351
356
  listMembers,
357
+ log,
352
358
  md5,
353
359
  merge,
354
360
  post,
package/dist/index.js CHANGED
@@ -12,6 +12,7 @@ __export(Adaptor_exports, {
12
12
  archiveMember: () => archiveMember,
13
13
  axios: () => axios,
14
14
  chunk: () => chunk,
15
+ combine: () => combine,
15
16
  dataPath: () => dataPath,
16
17
  dataValue: () => dataValue,
17
18
  deleteMember: () => deleteMember,
@@ -27,6 +28,7 @@ __export(Adaptor_exports, {
27
28
  listAudiences: () => listAudiences,
28
29
  listBatches: () => listBatches,
29
30
  listMembers: () => listMembers,
31
+ log: () => log,
30
32
  md5: () => md5,
31
33
  merge: () => merge,
32
34
  post: () => post,
@@ -66,17 +68,19 @@ function handleResponse(response, state, callback) {
66
68
 
67
69
  // src/Adaptor.js
68
70
  import {
69
- fn,
70
- fnIf,
71
71
  alterState,
72
+ chunk,
73
+ combine,
72
74
  dataPath,
73
75
  dataValue,
74
76
  each,
75
77
  field,
76
78
  fields,
79
+ fn,
80
+ fnIf,
77
81
  lastReferenceValue,
82
+ log,
78
83
  merge,
79
- chunk,
80
84
  sourceValue
81
85
  } from "@openfn/language-common";
82
86
  function execute(...operations) {
@@ -291,6 +295,7 @@ export {
291
295
  archiveMember,
292
296
  axios,
293
297
  chunk,
298
+ combine,
294
299
  dataPath,
295
300
  dataValue,
296
301
  src_default as default,
@@ -307,6 +312,7 @@ export {
307
312
  listAudiences,
308
313
  listBatches,
309
314
  listMembers,
315
+ log,
310
316
  md5,
311
317
  merge,
312
318
  post,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@openfn/language-mailchimp",
3
3
  "label": "Mailchimp",
4
- "version": "1.0.32",
4
+ "version": "1.1.0",
5
5
  "description": "An OpenFn adaptor for use with Mailchimp",
6
6
  "main": "dist/index.cjs",
7
7
  "author": "Open Function Group",
@@ -188,4 +188,4 @@ export function get(path: string, query: object, callback?: Function): Operation
188
188
  export function post(path: string, body: object, query: object, callback?: Function): Operation;
189
189
  import axios from "axios";
190
190
  export { axios, md5 };
191
- export { fn, fnIf, alterState, dataPath, dataValue, each, field, fields, lastReferenceValue, merge, chunk, sourceValue } from "@openfn/language-common";
191
+ export { alterState, chunk, combine, dataPath, dataValue, each, field, fields, fn, fnIf, lastReferenceValue, log, merge, sourceValue } from "@openfn/language-common";