@superdurable/connector-intuit-mailchimp 0.0.0-stage → 0.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/LICENSE +21 -0
- package/README.md +10 -2
- package/dex-connector.json +211 -0
- package/dist/chunk-FFHIGEZ2.js +350 -0
- package/dist/connection-CR-ewlWK.d.ts +369 -0
- package/dist/index.d.ts +371 -0
- package/dist/index.js +829 -0
- package/dist/mock.d.ts +149 -0
- package/dist/mock.js +359 -0
- package/package.json +61 -4
|
@@ -0,0 +1,369 @@
|
|
|
1
|
+
import { CredentialProvider, SecretString, Query, Mutation, ConnectionRef } from '@superdurable/connectors-sdk';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
/** Connector configuration; omitted fields use manifest defaults. */
|
|
5
|
+
interface Config {
|
|
6
|
+
/** Maximum complete Mailchimp Marketing API response in bytes. Leave blank to keep the displayed safety limit; enter a positive integer only to change it, for example when listMembers reads pages of up to 1000 contacts with many merge fields. An oversized read selects invalidResponse, and an oversized campaign read before a send selects invalidResponse without sending. */
|
|
7
|
+
maxResponseBytes?: number;
|
|
8
|
+
}
|
|
9
|
+
/** Runtime schema for manifest configuration. */
|
|
10
|
+
declare const ConfigSchema: z.ZodObject<{
|
|
11
|
+
maxResponseBytes: z.ZodOptional<z.ZodNumber>;
|
|
12
|
+
}, z.core.$strip>;
|
|
13
|
+
/** Private connector credentials resolved by the host. */
|
|
14
|
+
interface Credentials {
|
|
15
|
+
/** Secret Mailchimp Marketing API key of the Mailchimp user the connector acts as. Sign in at https://login.mailchimp.com/, select your profile icon, choose Profile, open the Extras drop-down, choose API keys, then Create A Key, name it, choose Generate Key, and Copy Key to Clipboard; Mailchimp shows the full key only once. It is letters and digits, then a hyphen and your data center, such as -us6 at the end. Paste the whole key including the suffix: the connector derives the API host https://us6.api.mailchimp.com/3.0 from it, so there is no separate server field, and sends the key as a Bearer token only to that host. Stored only in this credential field; keys created on or after June 22, 2026 expire one year after creation, so paste the replacement key here before then. */
|
|
16
|
+
apiKey: SecretString;
|
|
17
|
+
}
|
|
18
|
+
/** Decode private credential fields for the connector. */
|
|
19
|
+
declare function decodeCredentials(value: unknown): Credentials;
|
|
20
|
+
/** Host-owned source of private connector credentials. */
|
|
21
|
+
type CredentialSource = CredentialProvider<Credentials>;
|
|
22
|
+
/** GetMemberInput identifies one audience contact. */
|
|
23
|
+
interface GetMemberInput {
|
|
24
|
+
/** ListID is the audience ID, Mailchimp's list_id, such as 57afe96172. */
|
|
25
|
+
"listId": string;
|
|
26
|
+
/** EmailAddress is the contact's bare email address. The connector requests the MD5 hash of its
|
|
27
|
+
* lowercased form, so letter case does not matter. */
|
|
28
|
+
"emailAddress": string;
|
|
29
|
+
}
|
|
30
|
+
/** Member is one audience contact as Mailchimp returned it. */
|
|
31
|
+
interface Member {
|
|
32
|
+
/** SubscriberHash is Mailchimp's member id: the MD5 hash of the lowercased email address. */
|
|
33
|
+
"subscriberHash": string;
|
|
34
|
+
/** EmailAddress is the contact's email address. */
|
|
35
|
+
"emailAddress": string;
|
|
36
|
+
/** ContactID is Mailchimp's contact_id, which stays stable when the address changes. */
|
|
37
|
+
"contactId"?: string | undefined;
|
|
38
|
+
/** FullName is the contact's full name, or empty. */
|
|
39
|
+
"fullName"?: string | undefined;
|
|
40
|
+
/** Status is the contact's current status, such as subscribed or unsubscribed. */
|
|
41
|
+
"status": "archived" | "cleaned" | "pending" | "subscribed" | "transactional" | "unsubscribed" | (string & {});
|
|
42
|
+
/** EmailType is html or text, or empty. */
|
|
43
|
+
"emailType"?: string | undefined;
|
|
44
|
+
/** MergeFields maps merge tags such as FNAME to Mailchimp's stored values: strings, numbers, or
|
|
45
|
+
* address objects. */
|
|
46
|
+
"mergeFields"?: {
|
|
47
|
+
[key: string]: unknown | null;
|
|
48
|
+
} | undefined;
|
|
49
|
+
/** Tags holds the names of at most 50 of the contact's tags, as Mailchimp returns them. */
|
|
50
|
+
"tags"?: Array<string> | undefined;
|
|
51
|
+
/** TagCount is the contact's total number of tags, which can exceed len(Tags). */
|
|
52
|
+
"tagCount": number;
|
|
53
|
+
/** IsVIP reports Mailchimp's VIP flag. */
|
|
54
|
+
"isVip"?: boolean | undefined;
|
|
55
|
+
/** Language is the contact's language code, or empty. */
|
|
56
|
+
"language"?: string | undefined;
|
|
57
|
+
/** ListID is the audience ID. */
|
|
58
|
+
"listId": string;
|
|
59
|
+
/** WebID is the ID of the contact's page in the Mailchimp web app, or zero. */
|
|
60
|
+
"webId"?: number | undefined;
|
|
61
|
+
/** SignedUpAt is when the contact signed up, or nil when Mailchimp has no signup time. */
|
|
62
|
+
"signedUpAt"?: string | null | undefined;
|
|
63
|
+
/** OptedInAt is when the contact confirmed opt-in, or nil. */
|
|
64
|
+
"optedInAt"?: string | null | undefined;
|
|
65
|
+
/** LastChangedAt is when the contact's information last changed, or nil. */
|
|
66
|
+
"lastChangedAt"?: string | null | undefined;
|
|
67
|
+
}
|
|
68
|
+
/** ListMembersInput selects one page of an audience's contacts. Pages are ordered by last change,
|
|
69
|
+
* oldest first, and continue with Offset. */
|
|
70
|
+
interface ListMembersInput {
|
|
71
|
+
/** ListID is the audience ID, Mailchimp's list_id. */
|
|
72
|
+
"listId": string;
|
|
73
|
+
/** Status keeps only contacts in one status, including cleaned or archived; empty lists every status. */
|
|
74
|
+
"status"?: "archived" | "cleaned" | "pending" | "subscribed" | "transactional" | "unsubscribed" | (string & {}) | undefined;
|
|
75
|
+
/** ChangedSince keeps only contacts whose information changed after this time; nil applies no bound. */
|
|
76
|
+
"changedSince"?: string | null | undefined;
|
|
77
|
+
/** OptedInSince keeps only contacts who opted in after this time; nil applies no bound. */
|
|
78
|
+
"optedInSince"?: string | null | undefined;
|
|
79
|
+
/** PageSize is the number of contacts to read, 1 to 1000; zero reads 100. */
|
|
80
|
+
"pageSize"?: number | undefined;
|
|
81
|
+
/** Offset is the number of matching contacts to skip; use the previous page's NextOffset. */
|
|
82
|
+
"offset"?: number | undefined;
|
|
83
|
+
}
|
|
84
|
+
/** ListMembersOutput is one page of contacts. */
|
|
85
|
+
interface ListMembersOutput {
|
|
86
|
+
/** Members are this page's contacts, oldest change first. */
|
|
87
|
+
"members": Array<Member> | null;
|
|
88
|
+
/** TotalItems is Mailchimp's count of every contact that matches the filters. */
|
|
89
|
+
"totalItems": number;
|
|
90
|
+
/** NextOffset is the Offset of the following page, or zero after the last page. */
|
|
91
|
+
"nextOffset"?: number | undefined;
|
|
92
|
+
}
|
|
93
|
+
/** MarketingPermissionInput is one GDPR marketing permission the contact opted in to or out of. */
|
|
94
|
+
interface MarketingPermissionInput {
|
|
95
|
+
/** MarketingPermissionID is the audience's marketing_permission_id, listed on a contact read with
|
|
96
|
+
* marketing permissions enabled. */
|
|
97
|
+
"marketingPermissionId": string;
|
|
98
|
+
/** IsEnabled reports that the contact opted in. */
|
|
99
|
+
"isEnabled": boolean;
|
|
100
|
+
}
|
|
101
|
+
/** UpsertMemberInput adds a contact to an audience or updates the existing contact with the same
|
|
102
|
+
* address. Mailchimp applies StatusIfNew only when it creates the contact, and Status to an existing
|
|
103
|
+
* contact too, so an unsubscribed contact keeps its status unless Status says otherwise. */
|
|
104
|
+
interface UpsertMemberInput {
|
|
105
|
+
/** ListID is the audience ID, Mailchimp's list_id. */
|
|
106
|
+
"listId": string;
|
|
107
|
+
/** EmailAddress is the contact's bare email address; letter case does not change which contact is written. */
|
|
108
|
+
"emailAddress": string;
|
|
109
|
+
/** StatusIfNew is the status of a contact Mailchimp creates: subscribed for a contact who gave
|
|
110
|
+
* permission, pending to send Mailchimp's confirmation email first, unsubscribed, or
|
|
111
|
+
* transactional. It is required and ignored for an existing contact. */
|
|
112
|
+
"statusIfNew": "archived" | "cleaned" | "pending" | "subscribed" | "transactional" | "unsubscribed" | (string & {});
|
|
113
|
+
/** Status, when set, also changes an existing contact's status: subscribed, pending, unsubscribed,
|
|
114
|
+
* or transactional. Empty keeps the existing contact's status. Unsubscribed records an opt-out. */
|
|
115
|
+
"status"?: "archived" | "cleaned" | "pending" | "subscribed" | "transactional" | "unsubscribed" | (string & {}) | undefined;
|
|
116
|
+
/** IsResubscribeAllowed must be true when Status is subscribed or pending, because Mailchimp then
|
|
117
|
+
* resubscribes, or emails a confirmation to, a contact who unsubscribed or was cleaned. Set it
|
|
118
|
+
* only when the contact asked to subscribe again. */
|
|
119
|
+
"isResubscribeAllowed"?: boolean | undefined;
|
|
120
|
+
/** MergeFields maps merge tags such as FNAME to values: a string, a number, or an address object
|
|
121
|
+
* with addr1, city, state, and zip. Tags that are omitted keep their stored values. */
|
|
122
|
+
"mergeFields"?: {
|
|
123
|
+
[key: string]: unknown | null;
|
|
124
|
+
} | undefined;
|
|
125
|
+
/** MarketingPermissions records the contact's consent to the audience's GDPR marketing permissions. */
|
|
126
|
+
"marketingPermissions"?: Array<MarketingPermissionInput> | undefined;
|
|
127
|
+
/** ShouldSkipMergeValidation sends skip_merge_validation=true, so Mailchimp accepts the contact
|
|
128
|
+
* without the audience's required merge fields. */
|
|
129
|
+
"shouldSkipMergeValidation"?: boolean | undefined;
|
|
130
|
+
}
|
|
131
|
+
/** UpsertMemberOutput is the contact after the write. */
|
|
132
|
+
interface UpsertMemberOutput {
|
|
133
|
+
/** Member is the contact Mailchimp returned. Its Status shows whether an existing contact kept
|
|
134
|
+
* its status, such as unsubscribed. */
|
|
135
|
+
"member": Member;
|
|
136
|
+
}
|
|
137
|
+
/** UpdateMemberTagsInput adds and removes tags on one existing audience contact. */
|
|
138
|
+
interface UpdateMemberTagsInput {
|
|
139
|
+
/** ListID is the audience ID, Mailchimp's list_id. */
|
|
140
|
+
"listId": string;
|
|
141
|
+
/** EmailAddress is the contact's bare email address. */
|
|
142
|
+
"emailAddress": string;
|
|
143
|
+
/** AddTags are declared active. Mailchimp creates a tag that does not exist yet, and a tag the
|
|
144
|
+
* contact already has stays as it is. */
|
|
145
|
+
"addTags"?: Array<string> | undefined;
|
|
146
|
+
/** RemoveTags are declared inactive; a tag the contact does not have is ignored. */
|
|
147
|
+
"removeTags"?: Array<string> | undefined;
|
|
148
|
+
/** ShouldSuppressAutomations sends is_syncing=true, so Mailchimp does not start automations
|
|
149
|
+
* triggered by these tag changes. */
|
|
150
|
+
"shouldSuppressAutomations"?: boolean | undefined;
|
|
151
|
+
}
|
|
152
|
+
/** UpdateMemberTagsOutput reports the tag declarations Mailchimp accepted. */
|
|
153
|
+
interface UpdateMemberTagsOutput {
|
|
154
|
+
/** SubscriberHash is the contact's MD5 subscriber hash. */
|
|
155
|
+
"subscriberHash": string;
|
|
156
|
+
/** ActiveTags are the tags declared active. */
|
|
157
|
+
"activeTags"?: Array<string> | undefined;
|
|
158
|
+
/** InactiveTags are the tags declared inactive. */
|
|
159
|
+
"inactiveTags"?: Array<string> | undefined;
|
|
160
|
+
}
|
|
161
|
+
/** SendCampaignInput identifies one existing campaign to send now. Create and review the campaign in
|
|
162
|
+
* Mailchimp first; the connector never edits campaign content or recipients. */
|
|
163
|
+
interface SendCampaignInput {
|
|
164
|
+
/** CampaignID is Mailchimp's campaign ID, such as 42694e9e57. */
|
|
165
|
+
"campaignId": string;
|
|
166
|
+
/** ExpectedListID, when set, sends only when the campaign targets this audience; a campaign whose
|
|
167
|
+
* audience was changed after it was approved selects notSendable. Empty skips the check. */
|
|
168
|
+
"expectedListId"?: string | undefined;
|
|
169
|
+
}
|
|
170
|
+
/** Campaign is the part of a Mailchimp campaign a send decision needs. */
|
|
171
|
+
interface Campaign {
|
|
172
|
+
/** ID is Mailchimp's campaign ID. */
|
|
173
|
+
"id": string;
|
|
174
|
+
/** WebID is the ID of the campaign's page in the Mailchimp web app, or zero. */
|
|
175
|
+
"webId"?: number | undefined;
|
|
176
|
+
/** Type is regular, plaintext, absplit, rss, or variate. */
|
|
177
|
+
"type": string;
|
|
178
|
+
/** Status is the campaign status Mailchimp reported when the connector read it. */
|
|
179
|
+
"status": "archived" | "canceled" | "canceling" | "paused" | "save" | "schedule" | "sending" | "sent" | (string & {});
|
|
180
|
+
/** Title is the campaign's internal title, or empty. */
|
|
181
|
+
"title"?: string | undefined;
|
|
182
|
+
/** SubjectLine is the campaign's subject line, or empty. */
|
|
183
|
+
"subjectLine"?: string | undefined;
|
|
184
|
+
/** ListID is the audience the campaign sends to. */
|
|
185
|
+
"listId"?: string | undefined;
|
|
186
|
+
/** ListName is that audience's name. */
|
|
187
|
+
"listName"?: string | undefined;
|
|
188
|
+
/** RecipientCount is Mailchimp's count of the campaign's recipients. */
|
|
189
|
+
"recipientCount": number;
|
|
190
|
+
/** EmailsSent is the number of emails Mailchimp sent for the campaign so far. */
|
|
191
|
+
"emailsSent": number;
|
|
192
|
+
/** CreatedAt is when the campaign was created, or nil. */
|
|
193
|
+
"createdAt"?: string | null | undefined;
|
|
194
|
+
/** SentAt is when the campaign was sent, or nil. */
|
|
195
|
+
"sentAt"?: string | null | undefined;
|
|
196
|
+
}
|
|
197
|
+
/** SendCampaignOutput is the campaign as the connector read it. */
|
|
198
|
+
interface SendCampaignOutput {
|
|
199
|
+
/** Campaign is the campaign Mailchimp returned in the read before the send, or in the read that
|
|
200
|
+
* found it already sending or sent. After sent, its Status is still the draft status save. */
|
|
201
|
+
"campaign": Campaign;
|
|
202
|
+
}
|
|
203
|
+
/** Runtime validator for GetMemberInput. */
|
|
204
|
+
declare const GetMemberInputSchema: z.ZodObject<{
|
|
205
|
+
listId: z.ZodString;
|
|
206
|
+
emailAddress: z.ZodString;
|
|
207
|
+
}, z.core.$strict>;
|
|
208
|
+
/** Runtime validator for Member. */
|
|
209
|
+
declare const MemberSchema: z.ZodObject<{
|
|
210
|
+
subscriberHash: z.ZodString;
|
|
211
|
+
emailAddress: z.ZodString;
|
|
212
|
+
contactId: z.ZodOptional<z.ZodString>;
|
|
213
|
+
fullName: z.ZodOptional<z.ZodString>;
|
|
214
|
+
status: z.ZodString;
|
|
215
|
+
emailType: z.ZodOptional<z.ZodString>;
|
|
216
|
+
mergeFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodUnknown>>>;
|
|
217
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
218
|
+
tagCount: z.ZodNumber;
|
|
219
|
+
isVip: z.ZodOptional<z.ZodBoolean>;
|
|
220
|
+
language: z.ZodOptional<z.ZodString>;
|
|
221
|
+
listId: z.ZodString;
|
|
222
|
+
webId: z.ZodOptional<z.ZodNumber>;
|
|
223
|
+
signedUpAt: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
224
|
+
optedInAt: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
225
|
+
lastChangedAt: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
226
|
+
}, z.core.$strict>;
|
|
227
|
+
/** Runtime validator for ListMembersOutput. */
|
|
228
|
+
declare const ListMembersOutputSchema: z.ZodObject<{
|
|
229
|
+
members: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
230
|
+
subscriberHash: z.ZodString;
|
|
231
|
+
emailAddress: z.ZodString;
|
|
232
|
+
contactId: z.ZodOptional<z.ZodString>;
|
|
233
|
+
fullName: z.ZodOptional<z.ZodString>;
|
|
234
|
+
status: z.ZodString;
|
|
235
|
+
emailType: z.ZodOptional<z.ZodString>;
|
|
236
|
+
mergeFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodUnknown>>>;
|
|
237
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
238
|
+
tagCount: z.ZodNumber;
|
|
239
|
+
isVip: z.ZodOptional<z.ZodBoolean>;
|
|
240
|
+
language: z.ZodOptional<z.ZodString>;
|
|
241
|
+
listId: z.ZodString;
|
|
242
|
+
webId: z.ZodOptional<z.ZodNumber>;
|
|
243
|
+
signedUpAt: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
244
|
+
optedInAt: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
245
|
+
lastChangedAt: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
246
|
+
}, z.core.$strict>>>;
|
|
247
|
+
totalItems: z.ZodNumber;
|
|
248
|
+
nextOffset: z.ZodOptional<z.ZodNumber>;
|
|
249
|
+
}, z.core.$strict>;
|
|
250
|
+
/** Runtime validator for MarketingPermissionInput. */
|
|
251
|
+
declare const MarketingPermissionInputSchema: z.ZodObject<{
|
|
252
|
+
marketingPermissionId: z.ZodString;
|
|
253
|
+
isEnabled: z.ZodBoolean;
|
|
254
|
+
}, z.core.$strict>;
|
|
255
|
+
/** Runtime validator for UpsertMemberInput. */
|
|
256
|
+
declare const UpsertMemberInputSchema: z.ZodObject<{
|
|
257
|
+
listId: z.ZodString;
|
|
258
|
+
emailAddress: z.ZodString;
|
|
259
|
+
statusIfNew: z.ZodString;
|
|
260
|
+
status: z.ZodOptional<z.ZodString>;
|
|
261
|
+
isResubscribeAllowed: z.ZodOptional<z.ZodBoolean>;
|
|
262
|
+
mergeFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodUnknown>>>;
|
|
263
|
+
marketingPermissions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
264
|
+
marketingPermissionId: z.ZodString;
|
|
265
|
+
isEnabled: z.ZodBoolean;
|
|
266
|
+
}, z.core.$strict>>>;
|
|
267
|
+
shouldSkipMergeValidation: z.ZodOptional<z.ZodBoolean>;
|
|
268
|
+
}, z.core.$strict>;
|
|
269
|
+
/** Runtime validator for UpsertMemberOutput. */
|
|
270
|
+
declare const UpsertMemberOutputSchema: z.ZodObject<{
|
|
271
|
+
member: z.ZodObject<{
|
|
272
|
+
subscriberHash: z.ZodString;
|
|
273
|
+
emailAddress: z.ZodString;
|
|
274
|
+
contactId: z.ZodOptional<z.ZodString>;
|
|
275
|
+
fullName: z.ZodOptional<z.ZodString>;
|
|
276
|
+
status: z.ZodString;
|
|
277
|
+
emailType: z.ZodOptional<z.ZodString>;
|
|
278
|
+
mergeFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodUnknown>>>;
|
|
279
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
280
|
+
tagCount: z.ZodNumber;
|
|
281
|
+
isVip: z.ZodOptional<z.ZodBoolean>;
|
|
282
|
+
language: z.ZodOptional<z.ZodString>;
|
|
283
|
+
listId: z.ZodString;
|
|
284
|
+
webId: z.ZodOptional<z.ZodNumber>;
|
|
285
|
+
signedUpAt: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
286
|
+
optedInAt: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
287
|
+
lastChangedAt: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
288
|
+
}, z.core.$strict>;
|
|
289
|
+
}, z.core.$strict>;
|
|
290
|
+
/** Runtime validator for UpdateMemberTagsInput. */
|
|
291
|
+
declare const UpdateMemberTagsInputSchema: z.ZodObject<{
|
|
292
|
+
listId: z.ZodString;
|
|
293
|
+
emailAddress: z.ZodString;
|
|
294
|
+
addTags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
295
|
+
removeTags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
296
|
+
shouldSuppressAutomations: z.ZodOptional<z.ZodBoolean>;
|
|
297
|
+
}, z.core.$strict>;
|
|
298
|
+
/** Runtime validator for UpdateMemberTagsOutput. */
|
|
299
|
+
declare const UpdateMemberTagsOutputSchema: z.ZodObject<{
|
|
300
|
+
subscriberHash: z.ZodString;
|
|
301
|
+
activeTags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
302
|
+
inactiveTags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
303
|
+
}, z.core.$strict>;
|
|
304
|
+
/** Runtime validator for SendCampaignInput. */
|
|
305
|
+
declare const SendCampaignInputSchema: z.ZodObject<{
|
|
306
|
+
campaignId: z.ZodString;
|
|
307
|
+
expectedListId: z.ZodOptional<z.ZodString>;
|
|
308
|
+
}, z.core.$strict>;
|
|
309
|
+
/** Runtime validator for Campaign. */
|
|
310
|
+
declare const CampaignSchema: z.ZodObject<{
|
|
311
|
+
id: z.ZodString;
|
|
312
|
+
webId: z.ZodOptional<z.ZodNumber>;
|
|
313
|
+
type: z.ZodString;
|
|
314
|
+
status: z.ZodString;
|
|
315
|
+
title: z.ZodOptional<z.ZodString>;
|
|
316
|
+
subjectLine: z.ZodOptional<z.ZodString>;
|
|
317
|
+
listId: z.ZodOptional<z.ZodString>;
|
|
318
|
+
listName: z.ZodOptional<z.ZodString>;
|
|
319
|
+
recipientCount: z.ZodNumber;
|
|
320
|
+
emailsSent: z.ZodNumber;
|
|
321
|
+
createdAt: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
322
|
+
sentAt: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
323
|
+
}, z.core.$strict>;
|
|
324
|
+
/** Runtime validator for SendCampaignOutput. */
|
|
325
|
+
declare const SendCampaignOutputSchema: z.ZodObject<{
|
|
326
|
+
campaign: z.ZodObject<{
|
|
327
|
+
id: z.ZodString;
|
|
328
|
+
webId: z.ZodOptional<z.ZodNumber>;
|
|
329
|
+
type: z.ZodString;
|
|
330
|
+
status: z.ZodString;
|
|
331
|
+
title: z.ZodOptional<z.ZodString>;
|
|
332
|
+
subjectLine: z.ZodOptional<z.ZodString>;
|
|
333
|
+
listId: z.ZodOptional<z.ZodString>;
|
|
334
|
+
listName: z.ZodOptional<z.ZodString>;
|
|
335
|
+
recipientCount: z.ZodNumber;
|
|
336
|
+
emailsSent: z.ZodNumber;
|
|
337
|
+
createdAt: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
338
|
+
sentAt: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
339
|
+
}, z.core.$strict>;
|
|
340
|
+
}, z.core.$strict>;
|
|
341
|
+
|
|
342
|
+
/** Typed operations supplied by a client or mock. */
|
|
343
|
+
interface Operations {
|
|
344
|
+
/** Invoke getMember through this connection. */
|
|
345
|
+
getMember(): Query<GetMemberInput, Member>;
|
|
346
|
+
/** Invoke listMembers through this connection. */
|
|
347
|
+
listMembers(): Query<ListMembersInput, ListMembersOutput>;
|
|
348
|
+
/** Invoke upsertMember through this connection. */
|
|
349
|
+
upsertMember(): Mutation<UpsertMemberInput, UpsertMemberOutput>;
|
|
350
|
+
/** Invoke updateMemberTags through this connection. */
|
|
351
|
+
updateMemberTags(): Mutation<UpdateMemberTagsInput, UpdateMemberTagsOutput>;
|
|
352
|
+
/** Invoke sendCampaign through this connection. */
|
|
353
|
+
sendCampaign(): Mutation<SendCampaignInput, SendCampaignOutput>;
|
|
354
|
+
}
|
|
355
|
+
/** Named connector connection kept outside Flow state. */
|
|
356
|
+
declare class Connection<BoundOperations = Operations> {
|
|
357
|
+
/** Stable provider and connection name. */
|
|
358
|
+
readonly reference: ConnectionRef;
|
|
359
|
+
/** Bound provider operations. */
|
|
360
|
+
readonly operations: BoundOperations;
|
|
361
|
+
/** Validate a reference and bind operations. */
|
|
362
|
+
constructor(reference: ConnectionRef, operations: BoundOperations);
|
|
363
|
+
}
|
|
364
|
+
/** Bind a client to a named connection. */
|
|
365
|
+
declare function newConnection(client: Operations, reference: ConnectionRef): Connection;
|
|
366
|
+
/** Bind scripted operations to a named connection. */
|
|
367
|
+
declare function newConnectionWithOperations(operations: Operations, reference: ConnectionRef): Connection;
|
|
368
|
+
|
|
369
|
+
export { Connection as C, type GetMemberInput as G, type ListMembersInput as L, type Member as M, type Operations as O, type SendCampaignInput as S, type UpdateMemberTagsInput as U, type ListMembersOutput as a, type SendCampaignOutput as b, type UpdateMemberTagsOutput as c, type UpsertMemberInput as d, type UpsertMemberOutput as e, type Config as f, type Credentials as g, type Campaign as h, CampaignSchema as i, ConfigSchema as j, type CredentialSource as k, GetMemberInputSchema as l, ListMembersOutputSchema as m, type MarketingPermissionInput as n, MarketingPermissionInputSchema as o, MemberSchema as p, SendCampaignInputSchema as q, SendCampaignOutputSchema as r, UpdateMemberTagsInputSchema as s, UpdateMemberTagsOutputSchema as t, UpsertMemberInputSchema as u, UpsertMemberOutputSchema as v, decodeCredentials as w, newConnection as x, newConnectionWithOperations as y };
|