@superdurable/connector-brevo 0.1.1 → 0.2.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/README.md +3 -1
- package/dex-connector.json +878 -4
- package/dist/chunk-VBTEJFWF.js +749 -0
- package/dist/connection-BZu1qFOK.d.ts +513 -0
- package/dist/index.d.ts +752 -5
- package/dist/index.js +1039 -48
- package/dist/mock.d.ts +265 -4
- package/dist/mock.js +652 -7
- package/package.json +4 -3
- package/dist/chunk-NI2F5J36.js +0 -131
- package/dist/connection-BmKZ2txn.d.ts +0 -98
|
@@ -0,0 +1,513 @@
|
|
|
1
|
+
import { SecretString, CredentialProvider, Mutation, Query, ConnectionRef } from '@superdurable/connectors-sdk';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { Codec } from '@superdurable/dex';
|
|
4
|
+
|
|
5
|
+
/** A signed 64-bit JSON integer. Values outside the safe number range retain their decimal token. */
|
|
6
|
+
type SignedInteger = number | Readonly<{
|
|
7
|
+
rawJSON: string;
|
|
8
|
+
}>;
|
|
9
|
+
/** Decode one signed Go integer from a safe number or a native raw JSON number token. */
|
|
10
|
+
declare function decodeSignedInteger(value: unknown): SignedInteger;
|
|
11
|
+
/** Read provider JSON with the original syntax of every numeric token for typed field validation. */
|
|
12
|
+
declare function parseJSONNumberTokens(text: string): unknown;
|
|
13
|
+
/** Decode JSON while retaining exact decimal tokens for integers outside JavaScript's safe range. */
|
|
14
|
+
declare function parseExactIntegerJSON(text: string): unknown;
|
|
15
|
+
/** JSON-wire codec for records with signed integer fields. An optional decoder validates the application type. */
|
|
16
|
+
declare function exactIntegerJSONCodec<T>(decode?: (value: unknown) => T): Codec<T>;
|
|
17
|
+
/** Connector configuration; omitted fields use manifest defaults. */
|
|
18
|
+
interface Config {
|
|
19
|
+
/** Brevo v3 API base URL; leave blank for the public endpoint, or enter a compatible HTTPS gateway URL for a custom deployment. */
|
|
20
|
+
baseUrl?: string;
|
|
21
|
+
/** Positive Go duration limiting each HTTP request; leave blank for the displayed default, or override for a slower network. Runtime value in milliseconds. */
|
|
22
|
+
timeoutMs?: number;
|
|
23
|
+
/** Maximum response bytes as a positive integer; leave blank for the displayed safety limit, or raise it for larger contact responses. */
|
|
24
|
+
maxResponseBytes?: number;
|
|
25
|
+
}
|
|
26
|
+
/** Runtime schema for manifest configuration. */
|
|
27
|
+
declare const ConfigSchema: z.ZodObject<{
|
|
28
|
+
baseUrl: z.ZodOptional<z.ZodString>;
|
|
29
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
30
|
+
maxResponseBytes: z.ZodOptional<z.ZodNumber>;
|
|
31
|
+
}, z.core.$strip>;
|
|
32
|
+
/** Private connector credentials resolved by the host. */
|
|
33
|
+
interface Credentials {
|
|
34
|
+
/** Secret Brevo API key from https://app.brevo.com/settings/keys/api after Settings > SMTP & API > API keys > Generate a new API key; copy the displayed string once. Blank prevents requests. */
|
|
35
|
+
apiKey: SecretString;
|
|
36
|
+
}
|
|
37
|
+
/** Stored credential material that fails the connector credential checks, so no retry can succeed. */
|
|
38
|
+
declare class CredentialMaterialError extends TypeError {
|
|
39
|
+
constructor(message: string);
|
|
40
|
+
}
|
|
41
|
+
/** Report malformed stored credential material, also behind the SDK provider's decoding TypeError. */
|
|
42
|
+
declare function isCredentialMaterialError(error: unknown): boolean;
|
|
43
|
+
/** Decode private credential fields for the connector. */
|
|
44
|
+
declare function decodeCredentials(value: unknown): Credentials;
|
|
45
|
+
/** Host-owned source of private connector credentials. */
|
|
46
|
+
type CredentialSource = CredentialProvider<Credentials>;
|
|
47
|
+
/** CreateContactInput supplies a new email-identified contact. */
|
|
48
|
+
interface CreateContactInput {
|
|
49
|
+
/** Email is the new contact's plain email address. */
|
|
50
|
+
"email": string;
|
|
51
|
+
/** Attributes sets existing uppercase Brevo contact attributes. */
|
|
52
|
+
"attributes"?: {
|
|
53
|
+
[key: string]: string;
|
|
54
|
+
} | undefined;
|
|
55
|
+
}
|
|
56
|
+
/** ContactWriteResult confirms a contact create or update without exposing provider data. */
|
|
57
|
+
interface ContactWriteResult {
|
|
58
|
+
/** ID is available when Brevo created the contact. */
|
|
59
|
+
"id"?: SignedInteger | undefined;
|
|
60
|
+
/** Email is the submitted contact email. */
|
|
61
|
+
"email": string;
|
|
62
|
+
/** Created distinguishes a 201 create from a 204 update. */
|
|
63
|
+
"created": boolean;
|
|
64
|
+
}
|
|
65
|
+
/** ListContactsInput selects a bounded page of contacts. */
|
|
66
|
+
interface ListContactsInput {
|
|
67
|
+
/** Limit is the number of contacts from 1 to 1000; zero uses 50. */
|
|
68
|
+
"limit": SignedInteger;
|
|
69
|
+
/** Offset is the zero-based starting index. */
|
|
70
|
+
"offset": SignedInteger;
|
|
71
|
+
}
|
|
72
|
+
/** ContactIdentity identifies an email or phone-only contact in a list. */
|
|
73
|
+
interface ContactIdentity {
|
|
74
|
+
/** ID is Brevo's contact identifier. */
|
|
75
|
+
"id": SignedInteger;
|
|
76
|
+
/** Email is present for email-identified contacts. */
|
|
77
|
+
"email"?: string | undefined;
|
|
78
|
+
}
|
|
79
|
+
/** ContactsList contains minimal contact identities and the account's total count. */
|
|
80
|
+
interface ContactsList {
|
|
81
|
+
/** Contacts is the current page without attributes or statistics. */
|
|
82
|
+
"contacts": Array<ContactIdentity> | null;
|
|
83
|
+
/** Count is Brevo's total matching contact count. */
|
|
84
|
+
"count": SignedInteger;
|
|
85
|
+
}
|
|
86
|
+
/** UpdateContactInput sets absolute existing contact attributes by email. */
|
|
87
|
+
interface UpdateContactInput {
|
|
88
|
+
/** Email identifies the contact. */
|
|
89
|
+
"email": string;
|
|
90
|
+
/** Attributes maps uppercase Brevo names to absolute string values. */
|
|
91
|
+
"attributes": {
|
|
92
|
+
[key: string]: string;
|
|
93
|
+
} | null;
|
|
94
|
+
}
|
|
95
|
+
/** ContactChangeResult identifies the updated or deleted contact. */
|
|
96
|
+
interface ContactChangeResult {
|
|
97
|
+
/** Email is the submitted address. */
|
|
98
|
+
"email": string;
|
|
99
|
+
}
|
|
100
|
+
/** DeleteContactInput identifies a contact to delete by email. */
|
|
101
|
+
interface DeleteContactInput {
|
|
102
|
+
/** Email identifies the contact. */
|
|
103
|
+
"email": string;
|
|
104
|
+
}
|
|
105
|
+
/** ListAttributesInput requests the account's contact attribute definitions. */
|
|
106
|
+
interface ListAttributesInput {
|
|
107
|
+
}
|
|
108
|
+
/** AttributeIdentity describes a contact attribute without its values. */
|
|
109
|
+
interface AttributeIdentity {
|
|
110
|
+
/** Name is the Brevo attribute name. */
|
|
111
|
+
"name": string;
|
|
112
|
+
/** Category identifies the attribute group. */
|
|
113
|
+
"category": string;
|
|
114
|
+
/** Type identifies the attribute value type. */
|
|
115
|
+
"type": string;
|
|
116
|
+
}
|
|
117
|
+
/** AttributesList contains the account's attribute definitions. */
|
|
118
|
+
interface AttributesList {
|
|
119
|
+
/** Attributes contains names, categories, and types only. */
|
|
120
|
+
"attributes": Array<AttributeIdentity> | null;
|
|
121
|
+
}
|
|
122
|
+
/** AttributeEnumerationValue defines one category attribute choice. */
|
|
123
|
+
interface AttributeEnumerationValue {
|
|
124
|
+
/** Value is Brevo's numeric category option value. */
|
|
125
|
+
"value": SignedInteger;
|
|
126
|
+
/** Label is the visible option label, up to 200 characters. */
|
|
127
|
+
"label": string;
|
|
128
|
+
}
|
|
129
|
+
/** CreateAttributeInput defines a contact attribute. */
|
|
130
|
+
interface CreateAttributeInput {
|
|
131
|
+
/** Category is normal, transactional, category, calculated, or global. */
|
|
132
|
+
"category": string;
|
|
133
|
+
/** Name is an uppercase contact attribute name. */
|
|
134
|
+
"name": string;
|
|
135
|
+
/** Type is required for normal, transactional, and category attributes. */
|
|
136
|
+
"type"?: string | undefined;
|
|
137
|
+
/** Value is required for calculated and global attributes. */
|
|
138
|
+
"value"?: string | undefined;
|
|
139
|
+
/** Options holds normal multiple-choice values, each up to 200 characters. */
|
|
140
|
+
"options"?: Array<string> | undefined;
|
|
141
|
+
/** Enumeration holds category choices. */
|
|
142
|
+
"enumeration"?: Array<AttributeEnumerationValue> | undefined;
|
|
143
|
+
}
|
|
144
|
+
/** AttributeChangeResult identifies the affected contact attribute. */
|
|
145
|
+
interface AttributeChangeResult {
|
|
146
|
+
/** Category is Brevo's attribute category. */
|
|
147
|
+
"category": string;
|
|
148
|
+
/** Name is the attribute name. */
|
|
149
|
+
"name": string;
|
|
150
|
+
}
|
|
151
|
+
/** UpdateAttributeInput replaces options or a calculated value. */
|
|
152
|
+
interface UpdateAttributeInput {
|
|
153
|
+
/** Category is normal, category, calculated, or global. */
|
|
154
|
+
"category": string;
|
|
155
|
+
/** Name is an uppercase contact attribute name. */
|
|
156
|
+
"name": string;
|
|
157
|
+
/** Options is the complete desired normal multiple-choice option set. */
|
|
158
|
+
"options"?: Array<string> | undefined;
|
|
159
|
+
/** Enumeration is the complete desired category option set. */
|
|
160
|
+
"enumeration"?: Array<AttributeEnumerationValue> | undefined;
|
|
161
|
+
/** Value replaces the calculated or global formula. */
|
|
162
|
+
"value"?: string | undefined;
|
|
163
|
+
}
|
|
164
|
+
/** DeleteAttributeInput identifies an attribute by category and name. */
|
|
165
|
+
interface DeleteAttributeInput {
|
|
166
|
+
/** Category is normal, transactional, category, calculated, or global. */
|
|
167
|
+
"category": string;
|
|
168
|
+
/** Name is an uppercase contact attribute name. */
|
|
169
|
+
"name": string;
|
|
170
|
+
}
|
|
171
|
+
/** ListSendersInput requests configured email senders. */
|
|
172
|
+
interface ListSendersInput {
|
|
173
|
+
}
|
|
174
|
+
/** SenderIdentity describes a configured sender without domain secrets. */
|
|
175
|
+
interface SenderIdentity {
|
|
176
|
+
/** ID is the Brevo sender identifier. */
|
|
177
|
+
"id": SignedInteger;
|
|
178
|
+
/** Name is the sender display name. */
|
|
179
|
+
"name": string;
|
|
180
|
+
/** Email is the sender address. */
|
|
181
|
+
"email": string;
|
|
182
|
+
/** Active indicates whether the sender is available for use. */
|
|
183
|
+
"active": boolean;
|
|
184
|
+
}
|
|
185
|
+
/** SendersList contains configured sender identities. */
|
|
186
|
+
interface SendersList {
|
|
187
|
+
/** Senders is the current account sender collection. */
|
|
188
|
+
"senders": Array<SenderIdentity> | null;
|
|
189
|
+
}
|
|
190
|
+
/** CreateSenderInput supplies a sender address and display name. */
|
|
191
|
+
interface CreateSenderInput {
|
|
192
|
+
/** Email is an address the owner can verify through Brevo. */
|
|
193
|
+
"email": string;
|
|
194
|
+
/** Name appears as the sender display name. */
|
|
195
|
+
"name": string;
|
|
196
|
+
}
|
|
197
|
+
/** SenderChangeResult identifies the created, updated, or deleted sender. */
|
|
198
|
+
interface SenderChangeResult {
|
|
199
|
+
/** ID is Brevo's numeric sender ID. */
|
|
200
|
+
"id": SignedInteger;
|
|
201
|
+
}
|
|
202
|
+
/** UpdateSenderInput sets a sender's absolute display name. */
|
|
203
|
+
interface UpdateSenderInput {
|
|
204
|
+
/** ID is Brevo's numeric sender ID. */
|
|
205
|
+
"id": SignedInteger;
|
|
206
|
+
/** Name replaces the current sender display name. */
|
|
207
|
+
"name": string;
|
|
208
|
+
}
|
|
209
|
+
/** DeleteSenderInput identifies the sender to delete. */
|
|
210
|
+
interface DeleteSenderInput {
|
|
211
|
+
/** ID is Brevo's numeric sender ID. */
|
|
212
|
+
"id": SignedInteger;
|
|
213
|
+
}
|
|
214
|
+
/** SendEmailInput supplies one recipient and inline transactional content. */
|
|
215
|
+
interface SendEmailInput {
|
|
216
|
+
/** SenderEmail is a verified Brevo sender address. */
|
|
217
|
+
"senderEmail": string;
|
|
218
|
+
/** SenderName is the sender's visible display name. */
|
|
219
|
+
"senderName": string;
|
|
220
|
+
/** ToEmail is the recipient address. */
|
|
221
|
+
"toEmail": string;
|
|
222
|
+
/** Subject is the email subject line. */
|
|
223
|
+
"subject": string;
|
|
224
|
+
/** TextContent is the optional plain text body. */
|
|
225
|
+
"textContent"?: string | undefined;
|
|
226
|
+
/** HTMLContent is the optional HTML body. */
|
|
227
|
+
"htmlContent"?: string | undefined;
|
|
228
|
+
}
|
|
229
|
+
/** EmailSendResult contains Brevo's non-secret message identifier. */
|
|
230
|
+
interface EmailSendResult {
|
|
231
|
+
/** MessageID identifies the accepted transactional email. */
|
|
232
|
+
"messageId": string;
|
|
233
|
+
}
|
|
234
|
+
/** SendTemplateEmailInput identifies a Brevo template and recipient. */
|
|
235
|
+
interface SendTemplateEmailInput {
|
|
236
|
+
/** TemplateID is the numeric ID of an active transactional template. */
|
|
237
|
+
"templateId": SignedInteger;
|
|
238
|
+
/** ToEmail is the recipient address. */
|
|
239
|
+
"toEmail": string;
|
|
240
|
+
/** Params supplies template variables without logging their values. */
|
|
241
|
+
"params"?: {
|
|
242
|
+
[key: string]: string;
|
|
243
|
+
} | undefined;
|
|
244
|
+
}
|
|
245
|
+
/** CreateOrUpdateContactInput supplies an email and absolute attribute values. */
|
|
246
|
+
interface CreateOrUpdateContactInput {
|
|
247
|
+
/** Email identifies the contact and must be a plain email address. */
|
|
248
|
+
"email": string;
|
|
249
|
+
/** Attributes sets existing Brevo contact attributes by their uppercase names. */
|
|
250
|
+
"attributes"?: {
|
|
251
|
+
[key: string]: string;
|
|
252
|
+
} | undefined;
|
|
253
|
+
}
|
|
254
|
+
/** GetContactInput identifies a contact by email. */
|
|
255
|
+
interface GetContactInput {
|
|
256
|
+
/** Email is a plain email address. */
|
|
257
|
+
"email": string;
|
|
258
|
+
}
|
|
259
|
+
/** Contact contains the minimal non-secret contact identity returned by Brevo. */
|
|
260
|
+
interface Contact {
|
|
261
|
+
/** ID is Brevo's contact identifier. */
|
|
262
|
+
"id": SignedInteger;
|
|
263
|
+
/** Email is the contact email. */
|
|
264
|
+
"email": string;
|
|
265
|
+
}
|
|
266
|
+
/** Runtime validator for CreateContactInput. */
|
|
267
|
+
declare const CreateContactInputSchema: z.ZodObject<{
|
|
268
|
+
email: z.ZodString;
|
|
269
|
+
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
270
|
+
}, z.core.$strict>;
|
|
271
|
+
/** Runtime validator for ContactWriteResult. */
|
|
272
|
+
declare const ContactWriteResultSchema: z.ZodObject<{
|
|
273
|
+
id: z.ZodOptional<z.ZodPipe<z.ZodUnknown, z.ZodTransform<number | Readonly<{
|
|
274
|
+
rawJSON: string;
|
|
275
|
+
}>, unknown>>>;
|
|
276
|
+
email: z.ZodString;
|
|
277
|
+
created: z.ZodBoolean;
|
|
278
|
+
}, z.core.$strict>;
|
|
279
|
+
/** Runtime validator for ListContactsInput. */
|
|
280
|
+
declare const ListContactsInputSchema: z.ZodObject<{
|
|
281
|
+
limit: z.ZodPipe<z.ZodUnknown, z.ZodTransform<number | Readonly<{
|
|
282
|
+
rawJSON: string;
|
|
283
|
+
}>, unknown>>;
|
|
284
|
+
offset: z.ZodPipe<z.ZodUnknown, z.ZodTransform<number | Readonly<{
|
|
285
|
+
rawJSON: string;
|
|
286
|
+
}>, unknown>>;
|
|
287
|
+
}, z.core.$strict>;
|
|
288
|
+
/** Runtime validator for ContactIdentity. */
|
|
289
|
+
declare const ContactIdentitySchema: z.ZodObject<{
|
|
290
|
+
id: z.ZodPipe<z.ZodUnknown, z.ZodTransform<number | Readonly<{
|
|
291
|
+
rawJSON: string;
|
|
292
|
+
}>, unknown>>;
|
|
293
|
+
email: z.ZodOptional<z.ZodString>;
|
|
294
|
+
}, z.core.$strict>;
|
|
295
|
+
/** Runtime validator for ContactsList. */
|
|
296
|
+
declare const ContactsListSchema: z.ZodObject<{
|
|
297
|
+
contacts: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
298
|
+
id: z.ZodPipe<z.ZodUnknown, z.ZodTransform<number | Readonly<{
|
|
299
|
+
rawJSON: string;
|
|
300
|
+
}>, unknown>>;
|
|
301
|
+
email: z.ZodOptional<z.ZodString>;
|
|
302
|
+
}, z.core.$strict>>>;
|
|
303
|
+
count: z.ZodPipe<z.ZodUnknown, z.ZodTransform<number | Readonly<{
|
|
304
|
+
rawJSON: string;
|
|
305
|
+
}>, unknown>>;
|
|
306
|
+
}, z.core.$strict>;
|
|
307
|
+
/** Runtime validator for UpdateContactInput. */
|
|
308
|
+
declare const UpdateContactInputSchema: z.ZodObject<{
|
|
309
|
+
email: z.ZodString;
|
|
310
|
+
attributes: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
311
|
+
}, z.core.$strict>;
|
|
312
|
+
/** Runtime validator for ContactChangeResult. */
|
|
313
|
+
declare const ContactChangeResultSchema: z.ZodObject<{
|
|
314
|
+
email: z.ZodString;
|
|
315
|
+
}, z.core.$strict>;
|
|
316
|
+
/** Runtime validator for DeleteContactInput. */
|
|
317
|
+
declare const DeleteContactInputSchema: z.ZodObject<{
|
|
318
|
+
email: z.ZodString;
|
|
319
|
+
}, z.core.$strict>;
|
|
320
|
+
/** Runtime validator for ListAttributesInput. */
|
|
321
|
+
declare const ListAttributesInputSchema: z.ZodObject<{}, z.core.$strict>;
|
|
322
|
+
/** Runtime validator for AttributeIdentity. */
|
|
323
|
+
declare const AttributeIdentitySchema: z.ZodObject<{
|
|
324
|
+
name: z.ZodString;
|
|
325
|
+
category: z.ZodString;
|
|
326
|
+
type: z.ZodString;
|
|
327
|
+
}, z.core.$strict>;
|
|
328
|
+
/** Runtime validator for AttributesList. */
|
|
329
|
+
declare const AttributesListSchema: z.ZodObject<{
|
|
330
|
+
attributes: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
331
|
+
name: z.ZodString;
|
|
332
|
+
category: z.ZodString;
|
|
333
|
+
type: z.ZodString;
|
|
334
|
+
}, z.core.$strict>>>;
|
|
335
|
+
}, z.core.$strict>;
|
|
336
|
+
/** Runtime validator for AttributeEnumerationValue. */
|
|
337
|
+
declare const AttributeEnumerationValueSchema: z.ZodObject<{
|
|
338
|
+
value: z.ZodPipe<z.ZodUnknown, z.ZodTransform<number | Readonly<{
|
|
339
|
+
rawJSON: string;
|
|
340
|
+
}>, unknown>>;
|
|
341
|
+
label: z.ZodString;
|
|
342
|
+
}, z.core.$strict>;
|
|
343
|
+
/** Runtime validator for CreateAttributeInput. */
|
|
344
|
+
declare const CreateAttributeInputSchema: z.ZodObject<{
|
|
345
|
+
category: z.ZodString;
|
|
346
|
+
name: z.ZodString;
|
|
347
|
+
type: z.ZodOptional<z.ZodString>;
|
|
348
|
+
value: z.ZodOptional<z.ZodString>;
|
|
349
|
+
options: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
350
|
+
enumeration: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
351
|
+
value: z.ZodPipe<z.ZodUnknown, z.ZodTransform<number | Readonly<{
|
|
352
|
+
rawJSON: string;
|
|
353
|
+
}>, unknown>>;
|
|
354
|
+
label: z.ZodString;
|
|
355
|
+
}, z.core.$strict>>>;
|
|
356
|
+
}, z.core.$strict>;
|
|
357
|
+
/** Runtime validator for AttributeChangeResult. */
|
|
358
|
+
declare const AttributeChangeResultSchema: z.ZodObject<{
|
|
359
|
+
category: z.ZodString;
|
|
360
|
+
name: z.ZodString;
|
|
361
|
+
}, z.core.$strict>;
|
|
362
|
+
/** Runtime validator for UpdateAttributeInput. */
|
|
363
|
+
declare const UpdateAttributeInputSchema: z.ZodObject<{
|
|
364
|
+
category: z.ZodString;
|
|
365
|
+
name: z.ZodString;
|
|
366
|
+
options: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
367
|
+
enumeration: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
368
|
+
value: z.ZodPipe<z.ZodUnknown, z.ZodTransform<number | Readonly<{
|
|
369
|
+
rawJSON: string;
|
|
370
|
+
}>, unknown>>;
|
|
371
|
+
label: z.ZodString;
|
|
372
|
+
}, z.core.$strict>>>;
|
|
373
|
+
value: z.ZodOptional<z.ZodString>;
|
|
374
|
+
}, z.core.$strict>;
|
|
375
|
+
/** Runtime validator for DeleteAttributeInput. */
|
|
376
|
+
declare const DeleteAttributeInputSchema: z.ZodObject<{
|
|
377
|
+
category: z.ZodString;
|
|
378
|
+
name: z.ZodString;
|
|
379
|
+
}, z.core.$strict>;
|
|
380
|
+
/** Runtime validator for ListSendersInput. */
|
|
381
|
+
declare const ListSendersInputSchema: z.ZodObject<{}, z.core.$strict>;
|
|
382
|
+
/** Runtime validator for SenderIdentity. */
|
|
383
|
+
declare const SenderIdentitySchema: z.ZodObject<{
|
|
384
|
+
id: z.ZodPipe<z.ZodUnknown, z.ZodTransform<number | Readonly<{
|
|
385
|
+
rawJSON: string;
|
|
386
|
+
}>, unknown>>;
|
|
387
|
+
name: z.ZodString;
|
|
388
|
+
email: z.ZodString;
|
|
389
|
+
active: z.ZodBoolean;
|
|
390
|
+
}, z.core.$strict>;
|
|
391
|
+
/** Runtime validator for SendersList. */
|
|
392
|
+
declare const SendersListSchema: z.ZodObject<{
|
|
393
|
+
senders: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
394
|
+
id: z.ZodPipe<z.ZodUnknown, z.ZodTransform<number | Readonly<{
|
|
395
|
+
rawJSON: string;
|
|
396
|
+
}>, unknown>>;
|
|
397
|
+
name: z.ZodString;
|
|
398
|
+
email: z.ZodString;
|
|
399
|
+
active: z.ZodBoolean;
|
|
400
|
+
}, z.core.$strict>>>;
|
|
401
|
+
}, z.core.$strict>;
|
|
402
|
+
/** Runtime validator for CreateSenderInput. */
|
|
403
|
+
declare const CreateSenderInputSchema: z.ZodObject<{
|
|
404
|
+
email: z.ZodString;
|
|
405
|
+
name: z.ZodString;
|
|
406
|
+
}, z.core.$strict>;
|
|
407
|
+
/** Runtime validator for SenderChangeResult. */
|
|
408
|
+
declare const SenderChangeResultSchema: z.ZodObject<{
|
|
409
|
+
id: z.ZodPipe<z.ZodUnknown, z.ZodTransform<number | Readonly<{
|
|
410
|
+
rawJSON: string;
|
|
411
|
+
}>, unknown>>;
|
|
412
|
+
}, z.core.$strict>;
|
|
413
|
+
/** Runtime validator for UpdateSenderInput. */
|
|
414
|
+
declare const UpdateSenderInputSchema: z.ZodObject<{
|
|
415
|
+
id: z.ZodPipe<z.ZodUnknown, z.ZodTransform<number | Readonly<{
|
|
416
|
+
rawJSON: string;
|
|
417
|
+
}>, unknown>>;
|
|
418
|
+
name: z.ZodString;
|
|
419
|
+
}, z.core.$strict>;
|
|
420
|
+
/** Runtime validator for DeleteSenderInput. */
|
|
421
|
+
declare const DeleteSenderInputSchema: z.ZodObject<{
|
|
422
|
+
id: z.ZodPipe<z.ZodUnknown, z.ZodTransform<number | Readonly<{
|
|
423
|
+
rawJSON: string;
|
|
424
|
+
}>, unknown>>;
|
|
425
|
+
}, z.core.$strict>;
|
|
426
|
+
/** Runtime validator for SendEmailInput. */
|
|
427
|
+
declare const SendEmailInputSchema: z.ZodObject<{
|
|
428
|
+
senderEmail: z.ZodString;
|
|
429
|
+
senderName: z.ZodString;
|
|
430
|
+
toEmail: z.ZodString;
|
|
431
|
+
subject: z.ZodString;
|
|
432
|
+
textContent: z.ZodOptional<z.ZodString>;
|
|
433
|
+
htmlContent: z.ZodOptional<z.ZodString>;
|
|
434
|
+
}, z.core.$strict>;
|
|
435
|
+
/** Runtime validator for EmailSendResult. */
|
|
436
|
+
declare const EmailSendResultSchema: z.ZodObject<{
|
|
437
|
+
messageId: z.ZodString;
|
|
438
|
+
}, z.core.$strict>;
|
|
439
|
+
/** Runtime validator for SendTemplateEmailInput. */
|
|
440
|
+
declare const SendTemplateEmailInputSchema: z.ZodObject<{
|
|
441
|
+
templateId: z.ZodPipe<z.ZodUnknown, z.ZodTransform<number | Readonly<{
|
|
442
|
+
rawJSON: string;
|
|
443
|
+
}>, unknown>>;
|
|
444
|
+
toEmail: z.ZodString;
|
|
445
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
446
|
+
}, z.core.$strict>;
|
|
447
|
+
/** Runtime validator for CreateOrUpdateContactInput. */
|
|
448
|
+
declare const CreateOrUpdateContactInputSchema: z.ZodObject<{
|
|
449
|
+
email: z.ZodString;
|
|
450
|
+
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
451
|
+
}, z.core.$strict>;
|
|
452
|
+
/** Runtime validator for GetContactInput. */
|
|
453
|
+
declare const GetContactInputSchema: z.ZodObject<{
|
|
454
|
+
email: z.ZodString;
|
|
455
|
+
}, z.core.$strict>;
|
|
456
|
+
/** Runtime validator for Contact. */
|
|
457
|
+
declare const ContactSchema: z.ZodObject<{
|
|
458
|
+
id: z.ZodPipe<z.ZodUnknown, z.ZodTransform<number | Readonly<{
|
|
459
|
+
rawJSON: string;
|
|
460
|
+
}>, unknown>>;
|
|
461
|
+
email: z.ZodString;
|
|
462
|
+
}, z.core.$strict>;
|
|
463
|
+
|
|
464
|
+
/** Typed operations supplied by a client or mock. */
|
|
465
|
+
interface Operations {
|
|
466
|
+
/** Invoke createContact through this connection. */
|
|
467
|
+
createContact(): Mutation<CreateContactInput, ContactWriteResult>;
|
|
468
|
+
/** Invoke listContacts through this connection. */
|
|
469
|
+
listContacts(): Query<ListContactsInput, ContactsList>;
|
|
470
|
+
/** Invoke updateContact through this connection. */
|
|
471
|
+
updateContact(): Mutation<UpdateContactInput, ContactChangeResult>;
|
|
472
|
+
/** Invoke deleteContact through this connection. */
|
|
473
|
+
deleteContact(): Mutation<DeleteContactInput, ContactChangeResult>;
|
|
474
|
+
/** Invoke listAttributes through this connection. */
|
|
475
|
+
listAttributes(): Query<ListAttributesInput, AttributesList>;
|
|
476
|
+
/** Invoke createAttribute through this connection. */
|
|
477
|
+
createAttribute(): Mutation<CreateAttributeInput, AttributeChangeResult>;
|
|
478
|
+
/** Invoke updateAttribute through this connection. */
|
|
479
|
+
updateAttribute(): Mutation<UpdateAttributeInput, AttributeChangeResult>;
|
|
480
|
+
/** Invoke deleteAttribute through this connection. */
|
|
481
|
+
deleteAttribute(): Mutation<DeleteAttributeInput, AttributeChangeResult>;
|
|
482
|
+
/** Invoke listSenders through this connection. */
|
|
483
|
+
listSenders(): Query<ListSendersInput, SendersList>;
|
|
484
|
+
/** Invoke createSender through this connection. */
|
|
485
|
+
createSender(): Mutation<CreateSenderInput, SenderChangeResult>;
|
|
486
|
+
/** Invoke updateSender through this connection. */
|
|
487
|
+
updateSender(): Mutation<UpdateSenderInput, SenderChangeResult>;
|
|
488
|
+
/** Invoke deleteSender through this connection. */
|
|
489
|
+
deleteSender(): Mutation<DeleteSenderInput, SenderChangeResult>;
|
|
490
|
+
/** Invoke sendEmail through this connection. */
|
|
491
|
+
sendEmail(): Mutation<SendEmailInput, EmailSendResult>;
|
|
492
|
+
/** Invoke sendTemplateEmail through this connection. */
|
|
493
|
+
sendTemplateEmail(): Mutation<SendTemplateEmailInput, EmailSendResult>;
|
|
494
|
+
/** Invoke createOrUpdateContact through this connection. */
|
|
495
|
+
createOrUpdateContact(): Mutation<CreateOrUpdateContactInput, ContactWriteResult>;
|
|
496
|
+
/** Invoke getContact through this connection. */
|
|
497
|
+
getContact(): Query<GetContactInput, Contact>;
|
|
498
|
+
}
|
|
499
|
+
/** Named connector connection kept outside Flow state. */
|
|
500
|
+
declare class Connection<BoundOperations = Operations> {
|
|
501
|
+
/** Stable provider and connection name. */
|
|
502
|
+
readonly reference: ConnectionRef;
|
|
503
|
+
/** Bound provider operations. */
|
|
504
|
+
readonly operations: BoundOperations;
|
|
505
|
+
/** Validate a reference and bind operations. */
|
|
506
|
+
constructor(reference: ConnectionRef, operations: BoundOperations);
|
|
507
|
+
}
|
|
508
|
+
/** Bind a client to a named connection. */
|
|
509
|
+
declare function newConnection(client: Operations, reference: ConnectionRef): Connection;
|
|
510
|
+
/** Bind scripted operations to a named connection. */
|
|
511
|
+
declare function newConnectionWithOperations(operations: Operations, reference: ConnectionRef): Connection;
|
|
512
|
+
|
|
513
|
+
export { ListAttributesInputSchema as $, type AttributeChangeResult as A, ConfigSchema as B, type CreateAttributeInput as C, type DeleteAttributeInput as D, type EmailSendResult as E, ContactChangeResultSchema as F, type GetContactInput as G, type ContactIdentity as H, ContactIdentitySchema as I, ContactSchema as J, ContactWriteResultSchema as K, type ListAttributesInput as L, ContactsListSchema as M, CreateAttributeInputSchema as N, type Operations as O, CreateContactInputSchema as P, CreateOrUpdateContactInputSchema as Q, CreateSenderInputSchema as R, type SenderChangeResult as S, CredentialMaterialError as T, type UpdateAttributeInput as U, type CredentialSource as V, DeleteAttributeInputSchema as W, DeleteContactInputSchema as X, DeleteSenderInputSchema as Y, EmailSendResultSchema as Z, GetContactInputSchema as _, Connection as a, ListContactsInputSchema as a0, ListSendersInputSchema as a1, SendEmailInputSchema as a2, SendTemplateEmailInputSchema as a3, SenderChangeResultSchema as a4, type SenderIdentity as a5, SenderIdentitySchema as a6, SendersListSchema as a7, type SignedInteger as a8, UpdateAttributeInputSchema as a9, UpdateContactInputSchema as aa, UpdateSenderInputSchema as ab, decodeCredentials as ac, decodeSignedInteger as ad, exactIntegerJSONCodec as ae, isCredentialMaterialError as af, newConnection as ag, newConnectionWithOperations as ah, parseExactIntegerJSON as ai, parseJSONNumberTokens as aj, type CreateContactInput as b, type ContactWriteResult as c, type CreateOrUpdateContactInput as d, type CreateSenderInput as e, type DeleteContactInput as f, type ContactChangeResult as g, type DeleteSenderInput as h, type Contact as i, type AttributesList as j, type ListContactsInput as k, type ContactsList as l, type ListSendersInput as m, type SendersList as n, type SendEmailInput as o, type SendTemplateEmailInput as p, type UpdateContactInput as q, type UpdateSenderInput as r, type Config as s, type Credentials as t, AttributeChangeResultSchema as u, type AttributeEnumerationValue as v, AttributeEnumerationValueSchema as w, type AttributeIdentity as x, AttributeIdentitySchema as y, AttributesListSchema as z };
|