@openfn/language-mailchimp 0.7.4 → 0.8.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
@@ -45,6 +45,59 @@
45
45
  },
46
46
  "valid": true
47
47
  },
48
+ {
49
+ "name": "fnIf",
50
+ "params": [
51
+ "condition",
52
+ "operation"
53
+ ],
54
+ "docs": {
55
+ "description": "A custom operation that will only execute the function if the condition returns true",
56
+ "tags": [
57
+ {
58
+ "title": "public",
59
+ "description": null,
60
+ "type": null
61
+ },
62
+ {
63
+ "title": "example",
64
+ "description": "fnIf((state) => state?.data?.name, get(\"https://example.com\"));"
65
+ },
66
+ {
67
+ "title": "function",
68
+ "description": null,
69
+ "name": null
70
+ },
71
+ {
72
+ "title": "param",
73
+ "description": "The condition that returns true",
74
+ "type": {
75
+ "type": "NameExpression",
76
+ "name": "Boolean"
77
+ },
78
+ "name": "condition"
79
+ },
80
+ {
81
+ "title": "param",
82
+ "description": "The operation needed to be executed.",
83
+ "type": {
84
+ "type": "NameExpression",
85
+ "name": "Operation"
86
+ },
87
+ "name": "operation"
88
+ },
89
+ {
90
+ "title": "returns",
91
+ "description": null,
92
+ "type": {
93
+ "type": "NameExpression",
94
+ "name": "Operation"
95
+ }
96
+ }
97
+ ]
98
+ },
99
+ "valid": true
100
+ },
48
101
  {
49
102
  "name": "sourceValue",
50
103
  "params": [
package/dist/index.cjs CHANGED
@@ -39,6 +39,7 @@ __export(src_exports, {
39
39
  field: () => import_language_common3.field,
40
40
  fields: () => import_language_common3.fields,
41
41
  fn: () => import_language_common3.fn,
42
+ fnIf: () => import_language_common3.fnIf,
42
43
  get: () => get,
43
44
  lastReferenceValue: () => import_language_common3.lastReferenceValue,
44
45
  listAudienceInfo: () => listAudienceInfo,
@@ -74,6 +75,7 @@ __export(Adaptor_exports, {
74
75
  field: () => import_language_common3.field,
75
76
  fields: () => import_language_common3.fields,
76
77
  fn: () => import_language_common3.fn,
78
+ fnIf: () => import_language_common3.fnIf,
77
79
  get: () => get,
78
80
  lastReferenceValue: () => import_language_common3.lastReferenceValue,
79
81
  listAudienceInfo: () => listAudienceInfo,
@@ -327,6 +329,7 @@ var src_default = Adaptor_exports;
327
329
  field,
328
330
  fields,
329
331
  fn,
332
+ fnIf,
330
333
  get,
331
334
  lastReferenceValue,
332
335
  listAudienceInfo,
package/dist/index.js CHANGED
@@ -20,6 +20,7 @@ __export(Adaptor_exports, {
20
20
  field: () => field,
21
21
  fields: () => fields,
22
22
  fn: () => fn,
23
+ fnIf: () => fnIf,
23
24
  get: () => get,
24
25
  lastReferenceValue: () => lastReferenceValue,
25
26
  listAudienceInfo: () => listAudienceInfo,
@@ -66,6 +67,7 @@ function handleResponse(response, state, callback) {
66
67
  // src/Adaptor.js
67
68
  import {
68
69
  fn,
70
+ fnIf,
69
71
  alterState,
70
72
  dataPath,
71
73
  dataValue,
@@ -285,6 +287,7 @@ export {
285
287
  field,
286
288
  fields,
287
289
  fn,
290
+ fnIf,
288
291
  get,
289
292
  lastReferenceValue,
290
293
  listAudienceInfo,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfn/language-mailchimp",
3
- "version": "0.7.4",
3
+ "version": "0.8.0",
4
4
  "description": "An OpenFn adaptor for use with Mailchimp",
5
5
  "main": "dist/index.cjs",
6
6
  "author": "Open Function Group",
@@ -13,7 +13,7 @@
13
13
  ],
14
14
  "dependencies": {
15
15
  "@mailchimp/mailchimp_marketing": "^3.0.80",
16
- "@openfn/language-common": "^1.13.2",
16
+ "@openfn/language-common": "^1.14.0",
17
17
  "axios": "^0.21.2",
18
18
  "md5": "^2.3.0",
19
19
  "undici": "^5.28.4"
@@ -173,4 +173,4 @@ export function get(path: string, query: object, callback?: Function): Operation
173
173
  export function post(path: string, body: object, query: object, callback?: Function): Operation;
174
174
  import axios from "axios";
175
175
  export { axios, md5 };
176
- export { fn, alterState, dataPath, dataValue, each, field, fields, lastReferenceValue, merge, chunk, sourceValue } from "@openfn/language-common";
176
+ export { fn, fnIf, alterState, dataPath, dataValue, each, field, fields, lastReferenceValue, merge, chunk, sourceValue } from "@openfn/language-common";