@openfn/language-mailchimp 1.0.0 → 1.0.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 CHANGED
@@ -1,5 +1,872 @@
1
1
  {
2
- "operations": [],
2
+ "operations": [
3
+ {
4
+ "name": "upsertMembers",
5
+ "params": [
6
+ "params",
7
+ "callback"
8
+ ],
9
+ "docs": {
10
+ "description": "Add or update a list members",
11
+ "tags": [
12
+ {
13
+ "title": "example",
14
+ "description": "upsertMembers((state) => ({\n listId: \"someId\",\n users: state.response.body.rows.map((u) => ({\n email: u.email,\n status: u.allow_other_emails ? \"subscribed\" : \"unsubscribed\",\n mergeFields: { FNAME: u.first_name, LNAME: u.last_name },\n })),\n}));"
15
+ },
16
+ {
17
+ "title": "function",
18
+ "description": null,
19
+ "name": null
20
+ },
21
+ {
22
+ "title": "public",
23
+ "description": null,
24
+ "type": null
25
+ },
26
+ {
27
+ "title": "param",
28
+ "description": "a listId, users, and options",
29
+ "type": {
30
+ "type": "NameExpression",
31
+ "name": "object"
32
+ },
33
+ "name": "params"
34
+ },
35
+ {
36
+ "title": "param",
37
+ "description": "Optional callback to handle the response",
38
+ "type": {
39
+ "type": "OptionalType",
40
+ "expression": {
41
+ "type": "NameExpression",
42
+ "name": "function"
43
+ }
44
+ },
45
+ "name": "callback"
46
+ },
47
+ {
48
+ "title": "returns",
49
+ "description": null,
50
+ "type": {
51
+ "type": "NameExpression",
52
+ "name": "Operation"
53
+ }
54
+ }
55
+ ]
56
+ },
57
+ "valid": true
58
+ },
59
+ {
60
+ "name": "tagMembers",
61
+ "params": [
62
+ "params",
63
+ "callback"
64
+ ],
65
+ "docs": {
66
+ "description": "Tag members with a particular tag",
67
+ "tags": [
68
+ {
69
+ "title": "example",
70
+ "description": "tagMembers((state) => ({\n listId: \"someId\", // All Subscribers list\n tagId: \"someTag\", // User tag\n members: state.response.body.rows.map((u) => u.email),\n}));"
71
+ },
72
+ {
73
+ "title": "example",
74
+ "description": "tagMembers((state) => ({\n listId: \"someId\",\n tagId: \"someTag\",\n members: state.response.body.rows\n .filter((u) => u.allow_other_emails)\n .map((u) => u.email),\n}));"
75
+ },
76
+ {
77
+ "title": "function",
78
+ "description": null,
79
+ "name": null
80
+ },
81
+ {
82
+ "title": "public",
83
+ "description": null,
84
+ "type": null
85
+ },
86
+ {
87
+ "title": "param",
88
+ "description": "a tagId, members, and a list",
89
+ "type": {
90
+ "type": "NameExpression",
91
+ "name": "object"
92
+ },
93
+ "name": "params"
94
+ },
95
+ {
96
+ "title": "param",
97
+ "description": "Optional callback to handle the response",
98
+ "type": {
99
+ "type": "OptionalType",
100
+ "expression": {
101
+ "type": "NameExpression",
102
+ "name": "function"
103
+ }
104
+ },
105
+ "name": "callback"
106
+ },
107
+ {
108
+ "title": "returns",
109
+ "description": null,
110
+ "type": {
111
+ "type": "NameExpression",
112
+ "name": "Operation"
113
+ }
114
+ }
115
+ ]
116
+ },
117
+ "valid": true
118
+ },
119
+ {
120
+ "name": "startBatch",
121
+ "params": [
122
+ "params",
123
+ "callback"
124
+ ],
125
+ "docs": {
126
+ "description": "Start a batch with a list of operations.",
127
+ "tags": [
128
+ {
129
+ "title": "example",
130
+ "description": "startBatch(params)"
131
+ },
132
+ {
133
+ "title": "function",
134
+ "description": null,
135
+ "name": null
136
+ },
137
+ {
138
+ "title": "public",
139
+ "description": null,
140
+ "type": null
141
+ },
142
+ {
143
+ "title": "param",
144
+ "description": "operations batch job",
145
+ "type": {
146
+ "type": "NameExpression",
147
+ "name": "object"
148
+ },
149
+ "name": "params"
150
+ },
151
+ {
152
+ "title": "param",
153
+ "description": "Optional callback to handle the response",
154
+ "type": {
155
+ "type": "OptionalType",
156
+ "expression": {
157
+ "type": "NameExpression",
158
+ "name": "function"
159
+ }
160
+ },
161
+ "name": "callback"
162
+ },
163
+ {
164
+ "title": "returns",
165
+ "description": null,
166
+ "type": {
167
+ "type": "NameExpression",
168
+ "name": "Operation"
169
+ }
170
+ }
171
+ ]
172
+ },
173
+ "valid": true
174
+ },
175
+ {
176
+ "name": "listBatches",
177
+ "params": [
178
+ "params",
179
+ "callback"
180
+ ],
181
+ "docs": {
182
+ "description": "listBatches",
183
+ "tags": [
184
+ {
185
+ "title": "function",
186
+ "description": null,
187
+ "name": null
188
+ },
189
+ {
190
+ "title": "public",
191
+ "description": null,
192
+ "type": null
193
+ },
194
+ {
195
+ "title": "param",
196
+ "description": "a listId, and options",
197
+ "type": {
198
+ "type": "NameExpression",
199
+ "name": "object"
200
+ },
201
+ "name": "params"
202
+ },
203
+ {
204
+ "title": "param",
205
+ "description": "Optional callback to handle the response",
206
+ "type": {
207
+ "type": "OptionalType",
208
+ "expression": {
209
+ "type": "NameExpression",
210
+ "name": "function"
211
+ }
212
+ },
213
+ "name": "callback"
214
+ },
215
+ {
216
+ "title": "returns",
217
+ "description": null,
218
+ "type": {
219
+ "type": "NameExpression",
220
+ "name": "Operation"
221
+ }
222
+ }
223
+ ]
224
+ },
225
+ "valid": true
226
+ },
227
+ {
228
+ "name": "listMembers",
229
+ "params": [
230
+ "params",
231
+ "callback"
232
+ ],
233
+ "docs": {
234
+ "description": "listMembers",
235
+ "tags": [
236
+ {
237
+ "title": "function",
238
+ "description": null,
239
+ "name": null
240
+ },
241
+ {
242
+ "title": "public",
243
+ "description": null,
244
+ "type": null
245
+ },
246
+ {
247
+ "title": "param",
248
+ "description": "a listId, and options",
249
+ "type": {
250
+ "type": "NameExpression",
251
+ "name": "object"
252
+ },
253
+ "name": "params"
254
+ },
255
+ {
256
+ "title": "param",
257
+ "description": "Optional callback to handle the response",
258
+ "type": {
259
+ "type": "OptionalType",
260
+ "expression": {
261
+ "type": "NameExpression",
262
+ "name": "function"
263
+ }
264
+ },
265
+ "name": "callback"
266
+ },
267
+ {
268
+ "title": "returns",
269
+ "description": null,
270
+ "type": {
271
+ "type": "NameExpression",
272
+ "name": "Operation"
273
+ }
274
+ }
275
+ ]
276
+ },
277
+ "valid": true
278
+ },
279
+ {
280
+ "name": "addMember",
281
+ "params": [
282
+ "params",
283
+ "callback"
284
+ ],
285
+ "docs": {
286
+ "description": "addMember to a list",
287
+ "tags": [
288
+ {
289
+ "title": "function",
290
+ "description": null,
291
+ "name": null
292
+ },
293
+ {
294
+ "title": "public",
295
+ "description": null,
296
+ "type": null
297
+ },
298
+ {
299
+ "title": "param",
300
+ "description": "a listId, and options",
301
+ "type": {
302
+ "type": "NameExpression",
303
+ "name": "object"
304
+ },
305
+ "name": "params"
306
+ },
307
+ {
308
+ "title": "param",
309
+ "description": "Optional callback to handle the response",
310
+ "type": {
311
+ "type": "OptionalType",
312
+ "expression": {
313
+ "type": "NameExpression",
314
+ "name": "function"
315
+ }
316
+ },
317
+ "name": "callback"
318
+ },
319
+ {
320
+ "title": "returns",
321
+ "description": null,
322
+ "type": {
323
+ "type": "NameExpression",
324
+ "name": "Operation"
325
+ }
326
+ }
327
+ ]
328
+ },
329
+ "valid": true
330
+ },
331
+ {
332
+ "name": "updateMember",
333
+ "params": [
334
+ "params",
335
+ "callback"
336
+ ],
337
+ "docs": {
338
+ "description": "updateMember",
339
+ "tags": [
340
+ {
341
+ "title": "function",
342
+ "description": null,
343
+ "name": null
344
+ },
345
+ {
346
+ "title": "public",
347
+ "description": null,
348
+ "type": null
349
+ },
350
+ {
351
+ "title": "param",
352
+ "description": "a listId,subscriberHash and member",
353
+ "type": {
354
+ "type": "NameExpression",
355
+ "name": "object"
356
+ },
357
+ "name": "params"
358
+ },
359
+ {
360
+ "title": "param",
361
+ "description": "Optional callback to handle the response",
362
+ "type": {
363
+ "type": "OptionalType",
364
+ "expression": {
365
+ "type": "NameExpression",
366
+ "name": "function"
367
+ }
368
+ },
369
+ "name": "callback"
370
+ },
371
+ {
372
+ "title": "returns",
373
+ "description": null,
374
+ "type": {
375
+ "type": "NameExpression",
376
+ "name": "Operation"
377
+ }
378
+ }
379
+ ]
380
+ },
381
+ "valid": true
382
+ },
383
+ {
384
+ "name": "updateMemberTags",
385
+ "params": [
386
+ "params",
387
+ "callback"
388
+ ],
389
+ "docs": {
390
+ "description": "updateMemberTags",
391
+ "tags": [
392
+ {
393
+ "title": "function",
394
+ "description": null,
395
+ "name": null
396
+ },
397
+ {
398
+ "title": "public",
399
+ "description": null,
400
+ "type": null
401
+ },
402
+ {
403
+ "title": "param",
404
+ "description": "a listId, and options",
405
+ "type": {
406
+ "type": "NameExpression",
407
+ "name": "object"
408
+ },
409
+ "name": "params"
410
+ },
411
+ {
412
+ "title": "param",
413
+ "description": "Optional callback to handle the response",
414
+ "type": {
415
+ "type": "OptionalType",
416
+ "expression": {
417
+ "type": "NameExpression",
418
+ "name": "function"
419
+ }
420
+ },
421
+ "name": "callback"
422
+ },
423
+ {
424
+ "title": "returns",
425
+ "description": null,
426
+ "type": {
427
+ "type": "NameExpression",
428
+ "name": "Operation"
429
+ }
430
+ }
431
+ ]
432
+ },
433
+ "valid": true
434
+ },
435
+ {
436
+ "name": "archiveMember",
437
+ "params": [
438
+ "params",
439
+ "callback"
440
+ ],
441
+ "docs": {
442
+ "description": "archiveMember in a list",
443
+ "tags": [
444
+ {
445
+ "title": "function",
446
+ "description": null,
447
+ "name": null
448
+ },
449
+ {
450
+ "title": "public",
451
+ "description": null,
452
+ "type": null
453
+ },
454
+ {
455
+ "title": "param",
456
+ "description": "a listId, and options",
457
+ "type": {
458
+ "type": "NameExpression",
459
+ "name": "object"
460
+ },
461
+ "name": "params"
462
+ },
463
+ {
464
+ "title": "param",
465
+ "description": "Optional callback to handle the response",
466
+ "type": {
467
+ "type": "OptionalType",
468
+ "expression": {
469
+ "type": "NameExpression",
470
+ "name": "function"
471
+ }
472
+ },
473
+ "name": "callback"
474
+ },
475
+ {
476
+ "title": "returns",
477
+ "description": null,
478
+ "type": {
479
+ "type": "NameExpression",
480
+ "name": "Operation"
481
+ }
482
+ }
483
+ ]
484
+ },
485
+ "valid": true
486
+ },
487
+ {
488
+ "name": "deleteMember",
489
+ "params": [
490
+ "params",
491
+ "callback"
492
+ ],
493
+ "docs": {
494
+ "description": "Permanently delete a member from a list",
495
+ "tags": [
496
+ {
497
+ "title": "function",
498
+ "description": null,
499
+ "name": null
500
+ },
501
+ {
502
+ "title": "public",
503
+ "description": null,
504
+ "type": null
505
+ },
506
+ {
507
+ "title": "param",
508
+ "description": "a listId, and options",
509
+ "type": {
510
+ "type": "NameExpression",
511
+ "name": "object"
512
+ },
513
+ "name": "params"
514
+ },
515
+ {
516
+ "title": "param",
517
+ "description": "Optional callback to handle the response",
518
+ "type": {
519
+ "type": "OptionalType",
520
+ "expression": {
521
+ "type": "NameExpression",
522
+ "name": "function"
523
+ }
524
+ },
525
+ "name": "callback"
526
+ },
527
+ {
528
+ "title": "returns",
529
+ "description": null,
530
+ "type": {
531
+ "type": "NameExpression",
532
+ "name": "Operation"
533
+ }
534
+ }
535
+ ]
536
+ },
537
+ "valid": true
538
+ },
539
+ {
540
+ "name": "listAudiences",
541
+ "params": [
542
+ "query",
543
+ "callback"
544
+ ],
545
+ "docs": {
546
+ "description": "Get information about all lists in the account.",
547
+ "tags": [
548
+ {
549
+ "title": "function",
550
+ "description": null,
551
+ "name": null
552
+ },
553
+ {
554
+ "title": "public",
555
+ "description": null,
556
+ "type": null
557
+ },
558
+ {
559
+ "title": "param",
560
+ "description": "Query parameters",
561
+ "type": {
562
+ "type": "NameExpression",
563
+ "name": "object"
564
+ },
565
+ "name": "query"
566
+ },
567
+ {
568
+ "title": "param",
569
+ "description": "Optional callback to handle the response",
570
+ "type": {
571
+ "type": "OptionalType",
572
+ "expression": {
573
+ "type": "NameExpression",
574
+ "name": "function"
575
+ }
576
+ },
577
+ "name": "callback"
578
+ },
579
+ {
580
+ "title": "returns",
581
+ "description": null,
582
+ "type": {
583
+ "type": "NameExpression",
584
+ "name": "Operation"
585
+ }
586
+ }
587
+ ]
588
+ },
589
+ "valid": true
590
+ },
591
+ {
592
+ "name": "listAudienceInfo",
593
+ "params": [
594
+ "query",
595
+ "callback"
596
+ ],
597
+ "docs": {
598
+ "description": "Get information about a specific list in your Mailchimp account.\nResults include list members who have signed up but haven't confirmed their subscription yet and unsubscribed or cleaned.",
599
+ "tags": [
600
+ {
601
+ "title": "function",
602
+ "description": null,
603
+ "name": null
604
+ },
605
+ {
606
+ "title": "public",
607
+ "description": null,
608
+ "type": null
609
+ },
610
+ {
611
+ "title": "param",
612
+ "description": "listId and query parameters",
613
+ "type": {
614
+ "type": "NameExpression",
615
+ "name": "object"
616
+ },
617
+ "name": "query"
618
+ },
619
+ {
620
+ "title": "param",
621
+ "description": "Optional callback to handle the response",
622
+ "type": {
623
+ "type": "OptionalType",
624
+ "expression": {
625
+ "type": "NameExpression",
626
+ "name": "function"
627
+ }
628
+ },
629
+ "name": "callback"
630
+ },
631
+ {
632
+ "title": "returns",
633
+ "description": null,
634
+ "type": {
635
+ "type": "NameExpression",
636
+ "name": "Operation"
637
+ }
638
+ }
639
+ ]
640
+ },
641
+ "valid": true
642
+ },
643
+ {
644
+ "name": "request",
645
+ "params": [
646
+ "method",
647
+ "path",
648
+ "options",
649
+ "callback"
650
+ ],
651
+ "docs": {
652
+ "description": "Make an HTTP request to Mailchimp API",
653
+ "tags": [
654
+ {
655
+ "title": "example",
656
+ "description": "request('GET','/');",
657
+ "caption": "Get list to all other resources available in the API"
658
+ },
659
+ {
660
+ "title": "example",
661
+ "description": "request('POST','/accounts-export', {include_stages:[]});",
662
+ "caption": "Create a new account export in your Mailchimp account"
663
+ },
664
+ {
665
+ "title": "function",
666
+ "description": null,
667
+ "name": null
668
+ },
669
+ {
670
+ "title": "public",
671
+ "description": null,
672
+ "type": null
673
+ },
674
+ {
675
+ "title": "param",
676
+ "description": "The HTTP method for the request (e.g., 'GET', 'POST', 'PUT', 'DELETE').",
677
+ "type": {
678
+ "type": "NameExpression",
679
+ "name": "string"
680
+ },
681
+ "name": "method"
682
+ },
683
+ {
684
+ "title": "param",
685
+ "description": "The endpoint of the api to which the request should be made.",
686
+ "type": {
687
+ "type": "NameExpression",
688
+ "name": "string"
689
+ },
690
+ "name": "path"
691
+ },
692
+ {
693
+ "title": "param",
694
+ "description": "Additional options for the request (query, body only).",
695
+ "type": {
696
+ "type": "NameExpression",
697
+ "name": "Object"
698
+ },
699
+ "name": "options"
700
+ },
701
+ {
702
+ "title": "param",
703
+ "description": "(Optional) callback function to handle the response.",
704
+ "type": {
705
+ "type": "OptionalType",
706
+ "expression": {
707
+ "type": "NameExpression",
708
+ "name": "function"
709
+ }
710
+ },
711
+ "name": "callback"
712
+ },
713
+ {
714
+ "title": "returns",
715
+ "description": null,
716
+ "type": {
717
+ "type": "NameExpression",
718
+ "name": "Operation"
719
+ }
720
+ }
721
+ ]
722
+ },
723
+ "valid": true
724
+ },
725
+ {
726
+ "name": "get",
727
+ "params": [
728
+ "path",
729
+ "query",
730
+ "callback"
731
+ ],
732
+ "docs": {
733
+ "description": "The get function is used to make a GET request to the Mailchimp API.",
734
+ "tags": [
735
+ {
736
+ "title": "example",
737
+ "description": "get('/account-exports');",
738
+ "caption": "Get a list of account exports for a given account"
739
+ },
740
+ {
741
+ "title": "function",
742
+ "description": null,
743
+ "name": null
744
+ },
745
+ {
746
+ "title": "public",
747
+ "description": null,
748
+ "type": null
749
+ },
750
+ {
751
+ "title": "param",
752
+ "description": "The endpoint of the api to which the request should be made",
753
+ "type": {
754
+ "type": "NameExpression",
755
+ "name": "string"
756
+ },
757
+ "name": "path"
758
+ },
759
+ {
760
+ "title": "param",
761
+ "description": "An object containing query parameters to be included in the request",
762
+ "type": {
763
+ "type": "NameExpression",
764
+ "name": "object"
765
+ },
766
+ "name": "query"
767
+ },
768
+ {
769
+ "title": "param",
770
+ "description": "(Optional) callback to handle the response",
771
+ "type": {
772
+ "type": "OptionalType",
773
+ "expression": {
774
+ "type": "NameExpression",
775
+ "name": "function"
776
+ }
777
+ },
778
+ "name": "callback"
779
+ },
780
+ {
781
+ "title": "returns",
782
+ "description": null,
783
+ "type": {
784
+ "type": "NameExpression",
785
+ "name": "Operation"
786
+ }
787
+ }
788
+ ]
789
+ },
790
+ "valid": true
791
+ },
792
+ {
793
+ "name": "post",
794
+ "params": [
795
+ "path",
796
+ "body",
797
+ "query",
798
+ "callback"
799
+ ],
800
+ "docs": {
801
+ "description": "The post function is used to make a POST request to the Mailchimp API.",
802
+ "tags": [
803
+ {
804
+ "title": "example",
805
+ "description": "post('/accounts-export', {include_stages:[]});",
806
+ "caption": "Create a new account export in your Mailchimp account"
807
+ },
808
+ {
809
+ "title": "function",
810
+ "description": null,
811
+ "name": null
812
+ },
813
+ {
814
+ "title": "public",
815
+ "description": null,
816
+ "type": null
817
+ },
818
+ {
819
+ "title": "param",
820
+ "description": "The endpoint of the api to which the request should be made.",
821
+ "type": {
822
+ "type": "NameExpression",
823
+ "name": "string"
824
+ },
825
+ "name": "path"
826
+ },
827
+ {
828
+ "title": "param",
829
+ "description": "The data to be sent in the body of the request",
830
+ "type": {
831
+ "type": "NameExpression",
832
+ "name": "object"
833
+ },
834
+ "name": "body"
835
+ },
836
+ {
837
+ "title": "param",
838
+ "description": "An object containing query parameters to be included in the request",
839
+ "type": {
840
+ "type": "NameExpression",
841
+ "name": "object"
842
+ },
843
+ "name": "query"
844
+ },
845
+ {
846
+ "title": "param",
847
+ "description": "(Optional) callback to handle the response",
848
+ "type": {
849
+ "type": "OptionalType",
850
+ "expression": {
851
+ "type": "NameExpression",
852
+ "name": "function"
853
+ }
854
+ },
855
+ "name": "callback"
856
+ },
857
+ {
858
+ "title": "returns",
859
+ "description": null,
860
+ "type": {
861
+ "type": "NameExpression",
862
+ "name": "Operation"
863
+ }
864
+ }
865
+ ]
866
+ },
867
+ "valid": true
868
+ }
869
+ ],
3
870
  "exports": [],
4
871
  "common": [
5
872
  {
@@ -15,15 +882,15 @@
15
882
  "description": null,
16
883
  "type": null
17
884
  },
18
- {
19
- "title": "example",
20
- "description": "fn(state => {\n // do some things to state\n return state;\n});"
21
- },
22
885
  {
23
886
  "title": "function",
24
887
  "description": null,
25
888
  "name": null
26
889
  },
890
+ {
891
+ "title": "example",
892
+ "description": "fn(state => {\n // do some things to state\n return state;\n});"
893
+ },
27
894
  {
28
895
  "title": "param",
29
896
  "description": "is the function",
@@ -59,15 +926,15 @@
59
926
  "description": null,
60
927
  "type": null
61
928
  },
62
- {
63
- "title": "example",
64
- "description": "fnIf((state) => state?.data?.name, get(\"https://example.com\"));"
65
- },
66
929
  {
67
930
  "title": "function",
68
931
  "description": null,
69
932
  "name": null
70
933
  },
934
+ {
935
+ "title": "example",
936
+ "description": "fnIf((state) => state?.data?.name, get(\"https://example.com\"));"
937
+ },
71
938
  {
72
939
  "title": "param",
73
940
  "description": "The condition that returns true",
@@ -111,15 +978,15 @@
111
978
  "description": null,
112
979
  "type": null
113
980
  },
114
- {
115
- "title": "example",
116
- "description": "sourceValue('$.key')"
117
- },
118
981
  {
119
982
  "title": "function",
120
983
  "description": null,
121
984
  "name": null
122
985
  },
986
+ {
987
+ "title": "example",
988
+ "description": "sourceValue('$.key')"
989
+ },
123
990
  {
124
991
  "title": "param",
125
992
  "description": "JSONPath referencing a point in `state`.",
@@ -154,15 +1021,15 @@
154
1021
  "description": null,
155
1022
  "type": null
156
1023
  },
157
- {
158
- "title": "example",
159
- "description": "dataPath('key')"
160
- },
161
1024
  {
162
1025
  "title": "function",
163
1026
  "description": null,
164
1027
  "name": null
165
1028
  },
1029
+ {
1030
+ "title": "example",
1031
+ "description": "dataPath('key')"
1032
+ },
166
1033
  {
167
1034
  "title": "param",
168
1035
  "description": "JSONPath referencing a point in `data`.",
@@ -197,15 +1064,15 @@
197
1064
  "description": null,
198
1065
  "type": null
199
1066
  },
200
- {
201
- "title": "example",
202
- "description": "dataValue('key')"
203
- },
204
1067
  {
205
1068
  "title": "function",
206
1069
  "description": null,
207
1070
  "name": null
208
1071
  },
1072
+ {
1073
+ "title": "example",
1074
+ "description": "dataValue('key')"
1075
+ },
209
1076
  {
210
1077
  "title": "param",
211
1078
  "description": "JSONPath referencing a point in `data`.",
@@ -240,15 +1107,15 @@
240
1107
  "description": null,
241
1108
  "type": null
242
1109
  },
243
- {
244
- "title": "example",
245
- "description": "lastReferenceValue('key')"
246
- },
247
1110
  {
248
1111
  "title": "function",
249
1112
  "description": null,
250
1113
  "name": null
251
1114
  },
1115
+ {
1116
+ "title": "example",
1117
+ "description": "lastReferenceValue('key')"
1118
+ },
252
1119
  {
253
1120
  "title": "param",
254
1121
  "description": "JSONPath referencing a point in `references`.",
@@ -284,15 +1151,15 @@
284
1151
  "description": null,
285
1152
  "type": null
286
1153
  },
287
- {
288
- "title": "example",
289
- "description": "each(\"$.[*]\",\n create(\"SObject\",\n field(\"FirstName\", sourceValue(\"$.firstName\"))\n )\n)"
290
- },
291
1154
  {
292
1155
  "title": "function",
293
1156
  "description": null,
294
1157
  "name": null
295
1158
  },
1159
+ {
1160
+ "title": "example",
1161
+ "description": "each(\"$.[*]\",\n create(\"SObject\",\n field(\"FirstName\", sourceValue(\"$.firstName\"))\n )\n)"
1162
+ },
296
1163
  {
297
1164
  "title": "param",
298
1165
  "description": "JSONPath referencing a point in `state`.",
@@ -337,15 +1204,15 @@
337
1204
  "description": null,
338
1205
  "type": null
339
1206
  },
340
- {
341
- "title": "example",
342
- "description": "field('destination_field_name__c', 'value')"
343
- },
344
1207
  {
345
1208
  "title": "function",
346
1209
  "description": null,
347
1210
  "name": null
348
1211
  },
1212
+ {
1213
+ "title": "example",
1214
+ "description": "field('destination_field_name__c', 'value')"
1215
+ },
349
1216
  {
350
1217
  "title": "param",
351
1218
  "description": "Name of the field",
@@ -389,15 +1256,15 @@
389
1256
  "description": null,
390
1257
  "type": null
391
1258
  },
392
- {
393
- "title": "example",
394
- "description": "fields(list_of_fields)"
395
- },
396
1259
  {
397
1260
  "title": "function",
398
1261
  "description": null,
399
1262
  "name": null
400
1263
  },
1264
+ {
1265
+ "title": "example",
1266
+ "description": "fields(list_of_fields)"
1267
+ },
401
1268
  {
402
1269
  "title": "param",
403
1270
  "description": "a list of fields",
@@ -442,6 +1309,11 @@
442
1309
  "description": null,
443
1310
  "name": null
444
1311
  },
1312
+ {
1313
+ "title": "public",
1314
+ "description": null,
1315
+ "type": null
1316
+ },
445
1317
  {
446
1318
  "title": "param",
447
1319
  "description": null,
@@ -486,15 +1358,15 @@
486
1358
  "description": null,
487
1359
  "type": null
488
1360
  },
489
- {
490
- "title": "example",
491
- "description": "chunk([1,2,3,4,5], 2)"
492
- },
493
1361
  {
494
1362
  "title": "function",
495
1363
  "description": null,
496
1364
  "name": null
497
1365
  },
1366
+ {
1367
+ "title": "example",
1368
+ "description": "chunk([1,2,3,4,5], 2)"
1369
+ },
498
1370
  {
499
1371
  "title": "param",
500
1372
  "description": "Array to be chunked",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfn/language-mailchimp",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
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.14.0",
16
+ "@openfn/language-common": "^1.15.1",
17
17
  "axios": "^0.21.2",
18
18
  "md5": "^2.3.0",
19
19
  "undici": "^5.28.4"
@@ -23,6 +23,7 @@ export function execute(...operations: Operations): Operation;
23
23
  * })),
24
24
  * }));
25
25
  * @function
26
+ * @public
26
27
  * @param {object} params - a listId, users, and options
27
28
  * @param {function} [callback] - Optional callback to handle the response
28
29
  * @returns {Operation}
@@ -45,6 +46,7 @@ export function upsertMembers(params: object, callback?: Function): Operation;
45
46
  * .map((u) => u.email),
46
47
  * }));
47
48
  * @function
49
+ * @public
48
50
  * @param {object} params - a tagId, members, and a list
49
51
  * @param {function} [callback] - Optional callback to handle the response
50
52
  * @returns {Operation}
@@ -55,6 +57,7 @@ export function tagMembers(params: object, callback?: Function): Operation;
55
57
  * @example
56
58
  * startBatch(params)
57
59
  * @function
60
+ * @public
58
61
  * @param {object} params - operations batch job
59
62
  * @param {function} [callback] - Optional callback to handle the response
60
63
  * @returns {Operation}
@@ -63,6 +66,7 @@ export function startBatch(params: object, callback?: Function): Operation;
63
66
  /**
64
67
  * listBatches
65
68
  * @function
69
+ * @public
66
70
  * @param {object} params - a listId, and options
67
71
  * @param {function} [callback] - Optional callback to handle the response
68
72
  * @returns {Operation}
@@ -71,6 +75,7 @@ export function listBatches(params: object, callback?: Function): Operation;
71
75
  /**
72
76
  * listMembers
73
77
  * @function
78
+ * @public
74
79
  * @param {object} params - a listId, and options
75
80
  * @param {function} [callback] - Optional callback to handle the response
76
81
  * @returns {Operation}
@@ -79,6 +84,7 @@ export function listMembers(params: object, callback?: Function): Operation;
79
84
  /**
80
85
  * addMember to a list
81
86
  * @function
87
+ * @public
82
88
  * @param {object} params - a listId, and options
83
89
  * @param {function} [callback] - Optional callback to handle the response
84
90
  * @returns {Operation}
@@ -87,6 +93,7 @@ export function addMember(params: object, callback?: Function): Operation;
87
93
  /**
88
94
  * updateMember
89
95
  * @function
96
+ * @public
90
97
  * @param {object} params - a listId,subscriberHash and member
91
98
  * @param {function} [callback] - Optional callback to handle the response
92
99
  * @returns {Operation}
@@ -95,6 +102,7 @@ export function updateMember(params: object, callback?: Function): Operation;
95
102
  /**
96
103
  * updateMemberTags
97
104
  * @function
105
+ * @public
98
106
  * @param {object} params - a listId, and options
99
107
  * @param {function} [callback] - Optional callback to handle the response
100
108
  * @returns {Operation}
@@ -103,6 +111,7 @@ export function updateMemberTags(params: object, callback?: Function): Operation
103
111
  /**
104
112
  * archiveMember in a list
105
113
  * @function
114
+ * @public
106
115
  * @param {object} params - a listId, and options
107
116
  * @param {function} [callback] - Optional callback to handle the response
108
117
  * @returns {Operation}
@@ -111,6 +120,7 @@ export function archiveMember(params: object, callback?: Function): Operation;
111
120
  /**
112
121
  * Permanently delete a member from a list
113
122
  * @function
123
+ * @public
114
124
  * @param {object} params - a listId, and options
115
125
  * @param {function} [callback] - Optional callback to handle the response
116
126
  * @returns {Operation}
@@ -119,6 +129,7 @@ export function deleteMember(params: object, callback?: Function): Operation;
119
129
  /**
120
130
  * Get information about all lists in the account.
121
131
  * @function
132
+ * @public
122
133
  * @param {object} query - Query parameters
123
134
  * @param {function} [callback] - Optional callback to handle the response
124
135
  * @returns {Operation}
@@ -128,6 +139,7 @@ export function listAudiences(query: object, callback?: Function): Operation;
128
139
  * Get information about a specific list in your Mailchimp account.
129
140
  * Results include list members who have signed up but haven't confirmed their subscription yet and unsubscribed or cleaned.
130
141
  * @function
142
+ * @public
131
143
  * @param {object} query - listId and query parameters
132
144
  * @param {function} [callback] - Optional callback to handle the response
133
145
  * @returns {Operation}
@@ -140,6 +152,7 @@ export function listAudienceInfo(query: object, callback?: Function): Operation;
140
152
  * @example <caption>Create a new account export in your Mailchimp account</caption>
141
153
  * request('POST','/accounts-export', {include_stages:[]});
142
154
  * @function
155
+ * @public
143
156
  * @param {string} method - The HTTP method for the request (e.g., 'GET', 'POST', 'PUT', 'DELETE').
144
157
  * @param {string} path - The endpoint of the api to which the request should be made.
145
158
  * @param {Object} options - Additional options for the request (query, body only).
@@ -152,6 +165,7 @@ export function request(method: string, path: string, options: any, callback?: F
152
165
  * @example <caption>Get a list of account exports for a given account</caption>
153
166
  * get('/account-exports');
154
167
  * @function
168
+ * @public
155
169
  * @param {string} path - The endpoint of the api to which the request should be made
156
170
  * @param {object} query - An object containing query parameters to be included in the request
157
171
  * @param {function} [callback] - (Optional) callback to handle the response
@@ -164,6 +178,7 @@ export function get(path: string, query: object, callback?: Function): Operation
164
178
  * @example <caption>Create a new account export in your Mailchimp account</caption>
165
179
  * post('/accounts-export', {include_stages:[]});
166
180
  * @function
181
+ * @public
167
182
  * @param {string} path - The endpoint of the api to which the request should be made.
168
183
  * @param {object} body - The data to be sent in the body of the request
169
184
  * @param {object} query - An object containing query parameters to be included in the request