@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/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { C as CreateOrUpdateContactInput, a as ContactWriteResult, b as Connection, G as GetContactInput, c as Contact, O as Operations, d as Config, e as Credentials } from './connection-BmKZ2txn.js';
2
- export { f as ConfigSchema, g as ContactSchema, h as ContactWriteResultSchema, i as CreateOrUpdateContactInputSchema, j as CredentialSource, k as GetContactInputSchema, n as newConnection, l as newConnectionWithOperations } from './connection-BmKZ2txn.js';
1
+ import { C as CreateAttributeInput, A as AttributeChangeResult, a as Connection, b as CreateContactInput, c as ContactWriteResult, d as CreateOrUpdateContactInput, e as CreateSenderInput, S as SenderChangeResult, D as DeleteAttributeInput, f as DeleteContactInput, g as ContactChangeResult, h as DeleteSenderInput, G as GetContactInput, i as Contact, L as ListAttributesInput, j as AttributesList, k as ListContactsInput, l as ContactsList, m as ListSendersInput, n as SendersList, o as SendEmailInput, E as EmailSendResult, p as SendTemplateEmailInput, U as UpdateAttributeInput, q as UpdateContactInput, r as UpdateSenderInput, O as Operations, s as Config, t as Credentials } from './connection-BZu1qFOK.js';
2
+ export { u as AttributeChangeResultSchema, v as AttributeEnumerationValue, w as AttributeEnumerationValueSchema, x as AttributeIdentity, y as AttributeIdentitySchema, z as AttributesListSchema, B as ConfigSchema, F as ContactChangeResultSchema, H as ContactIdentity, I as ContactIdentitySchema, J as ContactSchema, K as ContactWriteResultSchema, M as ContactsListSchema, N as CreateAttributeInputSchema, P as CreateContactInputSchema, Q as CreateOrUpdateContactInputSchema, R as CreateSenderInputSchema, T as CredentialMaterialError, V as CredentialSource, W as DeleteAttributeInputSchema, X as DeleteContactInputSchema, Y as DeleteSenderInputSchema, Z as EmailSendResultSchema, _ as GetContactInputSchema, $ as ListAttributesInputSchema, a0 as ListContactsInputSchema, a1 as ListSendersInputSchema, a2 as SendEmailInputSchema, a3 as SendTemplateEmailInputSchema, a4 as SenderChangeResultSchema, a5 as SenderIdentity, a6 as SenderIdentitySchema, a7 as SendersListSchema, a8 as SignedInteger, a9 as UpdateAttributeInputSchema, aa as UpdateContactInputSchema, ab as UpdateSenderInputSchema, ac as decodeCredentials, ad as decodeSignedInteger, ae as exactIntegerJSONCodec, af as isCredentialMaterialError, ag as newConnection, ah as newConnectionWithOperations, ai as parseExactIntegerJSON, aj as parseJSONNumberTokens } from './connection-BZu1qFOK.js';
3
3
  import * as _superdurable_connectors_sdk from '@superdurable/connectors-sdk';
4
4
  import { MutationDefinition, QueryDefinition, MutationStepConfig, Mutation, MutationResult, QueryStepConfig, Query, QueryResult, MutationStep, QueryStep, Call, MutationAttempt, QueryAttempt, CredentialProvider, Failure } from '@superdurable/connectors-sdk';
5
5
  import { StepTarget } from '@superdurable/dex';
@@ -11,6 +11,328 @@ import 'zod';
11
11
  declare const ConnectorID = "brevo";
12
12
  /** Provider identity for named connections. */
13
13
  declare const ProviderID = "brevo";
14
+ /** Branch IDs for createContact. */
15
+ declare const CreateContactBranch: {
16
+ readonly Created: "created";
17
+ readonly ProviderRejected: "providerRejected";
18
+ readonly Defect: "defect";
19
+ readonly Uncertain: "uncertain";
20
+ };
21
+ /** Brevo created the contact. */
22
+ declare const CreateContactBranchCreated: "created";
23
+ /** Brevo conclusively rejected the contact. */
24
+ declare const CreateContactBranchProviderRejected: "providerRejected";
25
+ /** Local input or credentials are invalid. */
26
+ declare const CreateContactBranchDefect: "defect";
27
+ /** The contact may have been created after the send cap. */
28
+ declare const CreateContactBranchUncertain: "uncertain";
29
+ /** Manifest definition for createContact. */
30
+ declare const CreateContactDefinition: MutationDefinition;
31
+ /** Manifest metadata for createContact. */
32
+ declare const CreateContactMetadata: {
33
+ readonly kind: "mutation";
34
+ readonly idempotency: "required";
35
+ readonly authorization: "required";
36
+ };
37
+ /** Branch IDs for listContacts. */
38
+ declare const ListContactsBranch: {
39
+ readonly Listed: "listed";
40
+ readonly ProviderRejected: "providerRejected";
41
+ readonly InvalidResponse: "invalidResponse";
42
+ readonly Defect: "defect";
43
+ };
44
+ /** Brevo completed the operation. */
45
+ declare const ListContactsBranchListed: "listed";
46
+ /** Brevo conclusively rejected the request. */
47
+ declare const ListContactsBranchProviderRejected: "providerRejected";
48
+ /** Brevo returned malformed or oversized data. */
49
+ declare const ListContactsBranchInvalidResponse: "invalidResponse";
50
+ /** Local input or credentials are invalid. */
51
+ declare const ListContactsBranchDefect: "defect";
52
+ /** Manifest definition for listContacts. */
53
+ declare const ListContactsDefinition: QueryDefinition;
54
+ /** Manifest metadata for listContacts. */
55
+ declare const ListContactsMetadata: {
56
+ readonly kind: "query";
57
+ readonly idempotency: "none";
58
+ readonly authorization: "required";
59
+ };
60
+ /** Branch IDs for updateContact. */
61
+ declare const UpdateContactBranch: {
62
+ readonly Updated: "updated";
63
+ readonly NotFound: "notFound";
64
+ readonly ProviderRejected: "providerRejected";
65
+ readonly Defect: "defect";
66
+ };
67
+ /** Brevo completed the operation. */
68
+ declare const UpdateContactBranchUpdated: "updated";
69
+ /** Brevo did not find the contact. */
70
+ declare const UpdateContactBranchNotFound: "notFound";
71
+ /** Brevo conclusively rejected the request. */
72
+ declare const UpdateContactBranchProviderRejected: "providerRejected";
73
+ /** Local input or credentials are invalid. */
74
+ declare const UpdateContactBranchDefect: "defect";
75
+ /** Manifest definition for updateContact. */
76
+ declare const UpdateContactDefinition: MutationDefinition;
77
+ /** Manifest metadata for updateContact. */
78
+ declare const UpdateContactMetadata: {
79
+ readonly kind: "mutation";
80
+ readonly idempotency: "required";
81
+ readonly authorization: "required";
82
+ };
83
+ /** Branch IDs for deleteContact. */
84
+ declare const DeleteContactBranch: {
85
+ readonly Deleted: "deleted";
86
+ readonly NotFound: "notFound";
87
+ readonly ProviderRejected: "providerRejected";
88
+ readonly Defect: "defect";
89
+ };
90
+ /** Brevo completed the operation. */
91
+ declare const DeleteContactBranchDeleted: "deleted";
92
+ /** Brevo did not find the contact. */
93
+ declare const DeleteContactBranchNotFound: "notFound";
94
+ /** Brevo conclusively rejected the request. */
95
+ declare const DeleteContactBranchProviderRejected: "providerRejected";
96
+ /** Local input or credentials are invalid. */
97
+ declare const DeleteContactBranchDefect: "defect";
98
+ /** Manifest definition for deleteContact. */
99
+ declare const DeleteContactDefinition: MutationDefinition;
100
+ /** Manifest metadata for deleteContact. */
101
+ declare const DeleteContactMetadata: {
102
+ readonly kind: "mutation";
103
+ readonly idempotency: "required";
104
+ readonly authorization: "required";
105
+ };
106
+ /** Branch IDs for listAttributes. */
107
+ declare const ListAttributesBranch: {
108
+ readonly Listed: "listed";
109
+ readonly ProviderRejected: "providerRejected";
110
+ readonly InvalidResponse: "invalidResponse";
111
+ readonly Defect: "defect";
112
+ };
113
+ /** Brevo completed the operation. */
114
+ declare const ListAttributesBranchListed: "listed";
115
+ /** Brevo conclusively rejected the request. */
116
+ declare const ListAttributesBranchProviderRejected: "providerRejected";
117
+ /** Brevo returned malformed or oversized data. */
118
+ declare const ListAttributesBranchInvalidResponse: "invalidResponse";
119
+ /** Local input or credentials are invalid. */
120
+ declare const ListAttributesBranchDefect: "defect";
121
+ /** Manifest definition for listAttributes. */
122
+ declare const ListAttributesDefinition: QueryDefinition;
123
+ /** Manifest metadata for listAttributes. */
124
+ declare const ListAttributesMetadata: {
125
+ readonly kind: "query";
126
+ readonly idempotency: "none";
127
+ readonly authorization: "required";
128
+ };
129
+ /** Branch IDs for createAttribute. */
130
+ declare const CreateAttributeBranch: {
131
+ readonly Created: "created";
132
+ readonly ProviderRejected: "providerRejected";
133
+ readonly Defect: "defect";
134
+ readonly Uncertain: "uncertain";
135
+ };
136
+ /** Brevo created the attribute. */
137
+ declare const CreateAttributeBranchCreated: "created";
138
+ /** Brevo conclusively rejected the attribute. */
139
+ declare const CreateAttributeBranchProviderRejected: "providerRejected";
140
+ /** Local input or credentials are invalid. */
141
+ declare const CreateAttributeBranchDefect: "defect";
142
+ /** The attribute may have been created after the send cap. */
143
+ declare const CreateAttributeBranchUncertain: "uncertain";
144
+ /** Manifest definition for createAttribute. */
145
+ declare const CreateAttributeDefinition: MutationDefinition;
146
+ /** Manifest metadata for createAttribute. */
147
+ declare const CreateAttributeMetadata: {
148
+ readonly kind: "mutation";
149
+ readonly idempotency: "required";
150
+ readonly authorization: "required";
151
+ };
152
+ /** Branch IDs for updateAttribute. */
153
+ declare const UpdateAttributeBranch: {
154
+ readonly Updated: "updated";
155
+ readonly NotFound: "notFound";
156
+ readonly ProviderRejected: "providerRejected";
157
+ readonly Defect: "defect";
158
+ };
159
+ /** Brevo updated the attribute. */
160
+ declare const UpdateAttributeBranchUpdated: "updated";
161
+ /** Brevo did not find the attribute. */
162
+ declare const UpdateAttributeBranchNotFound: "notFound";
163
+ /** Brevo conclusively rejected the request. */
164
+ declare const UpdateAttributeBranchProviderRejected: "providerRejected";
165
+ /** Local input or credentials are invalid. */
166
+ declare const UpdateAttributeBranchDefect: "defect";
167
+ /** Manifest definition for updateAttribute. */
168
+ declare const UpdateAttributeDefinition: MutationDefinition;
169
+ /** Manifest metadata for updateAttribute. */
170
+ declare const UpdateAttributeMetadata: {
171
+ readonly kind: "mutation";
172
+ readonly idempotency: "required";
173
+ readonly authorization: "required";
174
+ };
175
+ /** Branch IDs for deleteAttribute. */
176
+ declare const DeleteAttributeBranch: {
177
+ readonly Deleted: "deleted";
178
+ readonly NotFound: "notFound";
179
+ readonly ProviderRejected: "providerRejected";
180
+ readonly Defect: "defect";
181
+ };
182
+ /** Brevo deleted the attribute. */
183
+ declare const DeleteAttributeBranchDeleted: "deleted";
184
+ /** Brevo did not find the attribute. */
185
+ declare const DeleteAttributeBranchNotFound: "notFound";
186
+ /** Brevo conclusively rejected the request. */
187
+ declare const DeleteAttributeBranchProviderRejected: "providerRejected";
188
+ /** Local input or credentials are invalid. */
189
+ declare const DeleteAttributeBranchDefect: "defect";
190
+ /** Manifest definition for deleteAttribute. */
191
+ declare const DeleteAttributeDefinition: MutationDefinition;
192
+ /** Manifest metadata for deleteAttribute. */
193
+ declare const DeleteAttributeMetadata: {
194
+ readonly kind: "mutation";
195
+ readonly idempotency: "required";
196
+ readonly authorization: "required";
197
+ };
198
+ /** Branch IDs for listSenders. */
199
+ declare const ListSendersBranch: {
200
+ readonly Listed: "listed";
201
+ readonly ProviderRejected: "providerRejected";
202
+ readonly InvalidResponse: "invalidResponse";
203
+ readonly Defect: "defect";
204
+ };
205
+ /** Brevo completed the operation. */
206
+ declare const ListSendersBranchListed: "listed";
207
+ /** Brevo conclusively rejected the request. */
208
+ declare const ListSendersBranchProviderRejected: "providerRejected";
209
+ /** Brevo returned malformed or oversized data. */
210
+ declare const ListSendersBranchInvalidResponse: "invalidResponse";
211
+ /** Local input or credentials are invalid. */
212
+ declare const ListSendersBranchDefect: "defect";
213
+ /** Manifest definition for listSenders. */
214
+ declare const ListSendersDefinition: QueryDefinition;
215
+ /** Manifest metadata for listSenders. */
216
+ declare const ListSendersMetadata: {
217
+ readonly kind: "query";
218
+ readonly idempotency: "none";
219
+ readonly authorization: "required";
220
+ };
221
+ /** Branch IDs for createSender. */
222
+ declare const CreateSenderBranch: {
223
+ readonly Created: "created";
224
+ readonly ProviderRejected: "providerRejected";
225
+ readonly Defect: "defect";
226
+ readonly Uncertain: "uncertain";
227
+ };
228
+ /** Brevo created the sender. */
229
+ declare const CreateSenderBranchCreated: "created";
230
+ /** Brevo conclusively rejected the sender. */
231
+ declare const CreateSenderBranchProviderRejected: "providerRejected";
232
+ /** Local input or credentials are invalid. */
233
+ declare const CreateSenderBranchDefect: "defect";
234
+ /** The sender may have been created after the send cap. */
235
+ declare const CreateSenderBranchUncertain: "uncertain";
236
+ /** Manifest definition for createSender. */
237
+ declare const CreateSenderDefinition: MutationDefinition;
238
+ /** Manifest metadata for createSender. */
239
+ declare const CreateSenderMetadata: {
240
+ readonly kind: "mutation";
241
+ readonly idempotency: "required";
242
+ readonly authorization: "required";
243
+ };
244
+ /** Branch IDs for updateSender. */
245
+ declare const UpdateSenderBranch: {
246
+ readonly Updated: "updated";
247
+ readonly NotFound: "notFound";
248
+ readonly ProviderRejected: "providerRejected";
249
+ readonly Defect: "defect";
250
+ };
251
+ /** Brevo updated the sender. */
252
+ declare const UpdateSenderBranchUpdated: "updated";
253
+ /** Brevo did not find the sender. */
254
+ declare const UpdateSenderBranchNotFound: "notFound";
255
+ /** Brevo conclusively rejected the request. */
256
+ declare const UpdateSenderBranchProviderRejected: "providerRejected";
257
+ /** Local input or credentials are invalid. */
258
+ declare const UpdateSenderBranchDefect: "defect";
259
+ /** Manifest definition for updateSender. */
260
+ declare const UpdateSenderDefinition: MutationDefinition;
261
+ /** Manifest metadata for updateSender. */
262
+ declare const UpdateSenderMetadata: {
263
+ readonly kind: "mutation";
264
+ readonly idempotency: "required";
265
+ readonly authorization: "required";
266
+ };
267
+ /** Branch IDs for deleteSender. */
268
+ declare const DeleteSenderBranch: {
269
+ readonly Deleted: "deleted";
270
+ readonly NotFound: "notFound";
271
+ readonly ProviderRejected: "providerRejected";
272
+ readonly Defect: "defect";
273
+ };
274
+ /** Brevo deleted the sender. */
275
+ declare const DeleteSenderBranchDeleted: "deleted";
276
+ /** Brevo did not find the sender. */
277
+ declare const DeleteSenderBranchNotFound: "notFound";
278
+ /** Brevo conclusively rejected the request. */
279
+ declare const DeleteSenderBranchProviderRejected: "providerRejected";
280
+ /** Local input or credentials are invalid. */
281
+ declare const DeleteSenderBranchDefect: "defect";
282
+ /** Manifest definition for deleteSender. */
283
+ declare const DeleteSenderDefinition: MutationDefinition;
284
+ /** Manifest metadata for deleteSender. */
285
+ declare const DeleteSenderMetadata: {
286
+ readonly kind: "mutation";
287
+ readonly idempotency: "required";
288
+ readonly authorization: "required";
289
+ };
290
+ /** Branch IDs for sendEmail. */
291
+ declare const SendEmailBranch: {
292
+ readonly Sent: "sent";
293
+ readonly ProviderRejected: "providerRejected";
294
+ readonly Defect: "defect";
295
+ readonly Uncertain: "uncertain";
296
+ };
297
+ /** Brevo accepted the transactional email. */
298
+ declare const SendEmailBranchSent: "sent";
299
+ /** Brevo conclusively rejected the email. */
300
+ declare const SendEmailBranchProviderRejected: "providerRejected";
301
+ /** Local input or credentials are invalid. */
302
+ declare const SendEmailBranchDefect: "defect";
303
+ /** The email may have been sent after the send cap. */
304
+ declare const SendEmailBranchUncertain: "uncertain";
305
+ /** Manifest definition for sendEmail. */
306
+ declare const SendEmailDefinition: MutationDefinition;
307
+ /** Manifest metadata for sendEmail. */
308
+ declare const SendEmailMetadata: {
309
+ readonly kind: "mutation";
310
+ readonly idempotency: "required";
311
+ readonly authorization: "required";
312
+ };
313
+ /** Branch IDs for sendTemplateEmail. */
314
+ declare const SendTemplateEmailBranch: {
315
+ readonly Sent: "sent";
316
+ readonly ProviderRejected: "providerRejected";
317
+ readonly Defect: "defect";
318
+ readonly Uncertain: "uncertain";
319
+ };
320
+ /** Brevo accepted the template email. */
321
+ declare const SendTemplateEmailBranchSent: "sent";
322
+ /** Brevo conclusively rejected the email. */
323
+ declare const SendTemplateEmailBranchProviderRejected: "providerRejected";
324
+ /** Local input or credentials are invalid. */
325
+ declare const SendTemplateEmailBranchDefect: "defect";
326
+ /** The email may have been sent after the send cap. */
327
+ declare const SendTemplateEmailBranchUncertain: "uncertain";
328
+ /** Manifest definition for sendTemplateEmail. */
329
+ declare const SendTemplateEmailDefinition: MutationDefinition;
330
+ /** Manifest metadata for sendTemplateEmail. */
331
+ declare const SendTemplateEmailMetadata: {
332
+ readonly kind: "mutation";
333
+ readonly idempotency: "required";
334
+ readonly authorization: "required";
335
+ };
14
336
  /** Branch IDs for createOrUpdateContact. */
15
337
  declare const CreateOrUpdateContactBranch: {
16
338
  readonly Saved: "saved";
@@ -61,6 +383,284 @@ declare const GetContactMetadata: {
61
383
  readonly authorization: "required";
62
384
  };
63
385
 
386
+ /** Configuration for the createContact connector Step. */
387
+ interface CreateContactStepConfig<StepInput, OperationInput = CreateContactInput, OperationOutput = ContactWriteResult> extends Omit<MutationStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
388
+ /** Named connection supplying this operation. */
389
+ connection: Connection<{
390
+ createContact(): Mutation<OperationInput, OperationOutput>;
391
+ }>;
392
+ /** Name matching the bound connection. */
393
+ connectionName: string;
394
+ /** Brevo created the contact. */
395
+ created: StepTarget<MutationResult<OperationOutput>>;
396
+ /** Brevo conclusively rejected the contact. */
397
+ providerRejected?: StepTarget<MutationResult<OperationOutput>>;
398
+ /** Local input or credentials are invalid. */
399
+ defect?: StepTarget<MutationResult<OperationOutput>>;
400
+ /** The contact may have been created after the send cap. */
401
+ uncertain?: StepTarget<MutationResult<OperationOutput>>;
402
+ }
403
+ /** Build the createContact Step from a named connection. */
404
+ declare function newCreateContactStep<StepInput, OperationInput = CreateContactInput, OperationOutput = ContactWriteResult>(configuration: CreateContactStepConfig<StepInput, OperationInput, OperationOutput>): MutationStep<StepInput, OperationInput, OperationOutput>;
405
+ /** Configuration for the listContacts connector Step. */
406
+ interface ListContactsStepConfig<StepInput, OperationInput = ListContactsInput, OperationOutput = ContactsList> extends Omit<QueryStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
407
+ /** Named connection supplying this operation. */
408
+ connection: Connection<{
409
+ listContacts(): Query<OperationInput, OperationOutput>;
410
+ }>;
411
+ /** Name matching the bound connection. */
412
+ connectionName: string;
413
+ /** Brevo completed the operation. */
414
+ listed: StepTarget<QueryResult<OperationOutput>>;
415
+ /** Brevo conclusively rejected the request. */
416
+ providerRejected?: StepTarget<QueryResult<OperationOutput>>;
417
+ /** Brevo returned malformed or oversized data. */
418
+ invalidResponse?: StepTarget<QueryResult<OperationOutput>>;
419
+ /** Local input or credentials are invalid. */
420
+ defect?: StepTarget<QueryResult<OperationOutput>>;
421
+ }
422
+ /** Build the listContacts Step from a named connection. */
423
+ declare function newListContactsStep<StepInput, OperationInput = ListContactsInput, OperationOutput = ContactsList>(configuration: ListContactsStepConfig<StepInput, OperationInput, OperationOutput>): QueryStep<StepInput, OperationInput, OperationOutput>;
424
+ /** Configuration for the updateContact connector Step. */
425
+ interface UpdateContactStepConfig<StepInput, OperationInput = UpdateContactInput, OperationOutput = ContactChangeResult> extends Omit<MutationStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
426
+ /** Named connection supplying this operation. */
427
+ connection: Connection<{
428
+ updateContact(): Mutation<OperationInput, OperationOutput>;
429
+ }>;
430
+ /** Name matching the bound connection. */
431
+ connectionName: string;
432
+ /** Brevo completed the operation. */
433
+ updated: StepTarget<MutationResult<OperationOutput>>;
434
+ /** Brevo did not find the contact. */
435
+ notFound?: StepTarget<MutationResult<OperationOutput>>;
436
+ /** Brevo conclusively rejected the request. */
437
+ providerRejected?: StepTarget<MutationResult<OperationOutput>>;
438
+ /** Local input or credentials are invalid. */
439
+ defect?: StepTarget<MutationResult<OperationOutput>>;
440
+ /** Accepted for compatibility; ignored because the operation is safe to repeat. */
441
+ maxSends?: number;
442
+ }
443
+ /** Build the updateContact Step from a named connection. */
444
+ declare function newUpdateContactStep<StepInput, OperationInput = UpdateContactInput, OperationOutput = ContactChangeResult>(configuration: UpdateContactStepConfig<StepInput, OperationInput, OperationOutput>): MutationStep<StepInput, OperationInput, OperationOutput>;
445
+ /** Configuration for the deleteContact connector Step. */
446
+ interface DeleteContactStepConfig<StepInput, OperationInput = DeleteContactInput, OperationOutput = ContactChangeResult> extends Omit<MutationStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
447
+ /** Named connection supplying this operation. */
448
+ connection: Connection<{
449
+ deleteContact(): Mutation<OperationInput, OperationOutput>;
450
+ }>;
451
+ /** Name matching the bound connection. */
452
+ connectionName: string;
453
+ /** Brevo completed the operation. */
454
+ deleted: StepTarget<MutationResult<OperationOutput>>;
455
+ /** Brevo did not find the contact. */
456
+ notFound?: StepTarget<MutationResult<OperationOutput>>;
457
+ /** Brevo conclusively rejected the request. */
458
+ providerRejected?: StepTarget<MutationResult<OperationOutput>>;
459
+ /** Local input or credentials are invalid. */
460
+ defect?: StepTarget<MutationResult<OperationOutput>>;
461
+ /** Accepted for compatibility; ignored because the operation is safe to repeat. */
462
+ maxSends?: number;
463
+ }
464
+ /** Build the deleteContact Step from a named connection. */
465
+ declare function newDeleteContactStep<StepInput, OperationInput = DeleteContactInput, OperationOutput = ContactChangeResult>(configuration: DeleteContactStepConfig<StepInput, OperationInput, OperationOutput>): MutationStep<StepInput, OperationInput, OperationOutput>;
466
+ /** Configuration for the listAttributes connector Step. */
467
+ interface ListAttributesStepConfig<StepInput, OperationInput = ListAttributesInput, OperationOutput = AttributesList> extends Omit<QueryStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
468
+ /** Named connection supplying this operation. */
469
+ connection: Connection<{
470
+ listAttributes(): Query<OperationInput, OperationOutput>;
471
+ }>;
472
+ /** Name matching the bound connection. */
473
+ connectionName: string;
474
+ /** Brevo completed the operation. */
475
+ listed: StepTarget<QueryResult<OperationOutput>>;
476
+ /** Brevo conclusively rejected the request. */
477
+ providerRejected?: StepTarget<QueryResult<OperationOutput>>;
478
+ /** Brevo returned malformed or oversized data. */
479
+ invalidResponse?: StepTarget<QueryResult<OperationOutput>>;
480
+ /** Local input or credentials are invalid. */
481
+ defect?: StepTarget<QueryResult<OperationOutput>>;
482
+ }
483
+ /** Build the listAttributes Step from a named connection. */
484
+ declare function newListAttributesStep<StepInput, OperationInput = ListAttributesInput, OperationOutput = AttributesList>(configuration: ListAttributesStepConfig<StepInput, OperationInput, OperationOutput>): QueryStep<StepInput, OperationInput, OperationOutput>;
485
+ /** Configuration for the createAttribute connector Step. */
486
+ interface CreateAttributeStepConfig<StepInput, OperationInput = CreateAttributeInput, OperationOutput = AttributeChangeResult> extends Omit<MutationStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
487
+ /** Named connection supplying this operation. */
488
+ connection: Connection<{
489
+ createAttribute(): Mutation<OperationInput, OperationOutput>;
490
+ }>;
491
+ /** Name matching the bound connection. */
492
+ connectionName: string;
493
+ /** Brevo created the attribute. */
494
+ created: StepTarget<MutationResult<OperationOutput>>;
495
+ /** Brevo conclusively rejected the attribute. */
496
+ providerRejected?: StepTarget<MutationResult<OperationOutput>>;
497
+ /** Local input or credentials are invalid. */
498
+ defect?: StepTarget<MutationResult<OperationOutput>>;
499
+ /** The attribute may have been created after the send cap. */
500
+ uncertain?: StepTarget<MutationResult<OperationOutput>>;
501
+ }
502
+ /** Build the createAttribute Step from a named connection. */
503
+ declare function newCreateAttributeStep<StepInput, OperationInput = CreateAttributeInput, OperationOutput = AttributeChangeResult>(configuration: CreateAttributeStepConfig<StepInput, OperationInput, OperationOutput>): MutationStep<StepInput, OperationInput, OperationOutput>;
504
+ /** Configuration for the updateAttribute connector Step. */
505
+ interface UpdateAttributeStepConfig<StepInput, OperationInput = UpdateAttributeInput, OperationOutput = AttributeChangeResult> extends Omit<MutationStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
506
+ /** Named connection supplying this operation. */
507
+ connection: Connection<{
508
+ updateAttribute(): Mutation<OperationInput, OperationOutput>;
509
+ }>;
510
+ /** Name matching the bound connection. */
511
+ connectionName: string;
512
+ /** Brevo updated the attribute. */
513
+ updated: StepTarget<MutationResult<OperationOutput>>;
514
+ /** Brevo did not find the attribute. */
515
+ notFound?: StepTarget<MutationResult<OperationOutput>>;
516
+ /** Brevo conclusively rejected the request. */
517
+ providerRejected?: StepTarget<MutationResult<OperationOutput>>;
518
+ /** Local input or credentials are invalid. */
519
+ defect?: StepTarget<MutationResult<OperationOutput>>;
520
+ /** Accepted for compatibility; ignored because the operation is safe to repeat. */
521
+ maxSends?: number;
522
+ }
523
+ /** Build the updateAttribute Step from a named connection. */
524
+ declare function newUpdateAttributeStep<StepInput, OperationInput = UpdateAttributeInput, OperationOutput = AttributeChangeResult>(configuration: UpdateAttributeStepConfig<StepInput, OperationInput, OperationOutput>): MutationStep<StepInput, OperationInput, OperationOutput>;
525
+ /** Configuration for the deleteAttribute connector Step. */
526
+ interface DeleteAttributeStepConfig<StepInput, OperationInput = DeleteAttributeInput, OperationOutput = AttributeChangeResult> extends Omit<MutationStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
527
+ /** Named connection supplying this operation. */
528
+ connection: Connection<{
529
+ deleteAttribute(): Mutation<OperationInput, OperationOutput>;
530
+ }>;
531
+ /** Name matching the bound connection. */
532
+ connectionName: string;
533
+ /** Brevo deleted the attribute. */
534
+ deleted: StepTarget<MutationResult<OperationOutput>>;
535
+ /** Brevo did not find the attribute. */
536
+ notFound?: StepTarget<MutationResult<OperationOutput>>;
537
+ /** Brevo conclusively rejected the request. */
538
+ providerRejected?: StepTarget<MutationResult<OperationOutput>>;
539
+ /** Local input or credentials are invalid. */
540
+ defect?: StepTarget<MutationResult<OperationOutput>>;
541
+ /** Accepted for compatibility; ignored because the operation is safe to repeat. */
542
+ maxSends?: number;
543
+ }
544
+ /** Build the deleteAttribute Step from a named connection. */
545
+ declare function newDeleteAttributeStep<StepInput, OperationInput = DeleteAttributeInput, OperationOutput = AttributeChangeResult>(configuration: DeleteAttributeStepConfig<StepInput, OperationInput, OperationOutput>): MutationStep<StepInput, OperationInput, OperationOutput>;
546
+ /** Configuration for the listSenders connector Step. */
547
+ interface ListSendersStepConfig<StepInput, OperationInput = ListSendersInput, OperationOutput = SendersList> extends Omit<QueryStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
548
+ /** Named connection supplying this operation. */
549
+ connection: Connection<{
550
+ listSenders(): Query<OperationInput, OperationOutput>;
551
+ }>;
552
+ /** Name matching the bound connection. */
553
+ connectionName: string;
554
+ /** Brevo completed the operation. */
555
+ listed: StepTarget<QueryResult<OperationOutput>>;
556
+ /** Brevo conclusively rejected the request. */
557
+ providerRejected?: StepTarget<QueryResult<OperationOutput>>;
558
+ /** Brevo returned malformed or oversized data. */
559
+ invalidResponse?: StepTarget<QueryResult<OperationOutput>>;
560
+ /** Local input or credentials are invalid. */
561
+ defect?: StepTarget<QueryResult<OperationOutput>>;
562
+ }
563
+ /** Build the listSenders Step from a named connection. */
564
+ declare function newListSendersStep<StepInput, OperationInput = ListSendersInput, OperationOutput = SendersList>(configuration: ListSendersStepConfig<StepInput, OperationInput, OperationOutput>): QueryStep<StepInput, OperationInput, OperationOutput>;
565
+ /** Configuration for the createSender connector Step. */
566
+ interface CreateSenderStepConfig<StepInput, OperationInput = CreateSenderInput, OperationOutput = SenderChangeResult> extends Omit<MutationStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
567
+ /** Named connection supplying this operation. */
568
+ connection: Connection<{
569
+ createSender(): Mutation<OperationInput, OperationOutput>;
570
+ }>;
571
+ /** Name matching the bound connection. */
572
+ connectionName: string;
573
+ /** Brevo created the sender. */
574
+ created: StepTarget<MutationResult<OperationOutput>>;
575
+ /** Brevo conclusively rejected the sender. */
576
+ providerRejected?: StepTarget<MutationResult<OperationOutput>>;
577
+ /** Local input or credentials are invalid. */
578
+ defect?: StepTarget<MutationResult<OperationOutput>>;
579
+ /** The sender may have been created after the send cap. */
580
+ uncertain?: StepTarget<MutationResult<OperationOutput>>;
581
+ }
582
+ /** Build the createSender Step from a named connection. */
583
+ declare function newCreateSenderStep<StepInput, OperationInput = CreateSenderInput, OperationOutput = SenderChangeResult>(configuration: CreateSenderStepConfig<StepInput, OperationInput, OperationOutput>): MutationStep<StepInput, OperationInput, OperationOutput>;
584
+ /** Configuration for the updateSender connector Step. */
585
+ interface UpdateSenderStepConfig<StepInput, OperationInput = UpdateSenderInput, OperationOutput = SenderChangeResult> extends Omit<MutationStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
586
+ /** Named connection supplying this operation. */
587
+ connection: Connection<{
588
+ updateSender(): Mutation<OperationInput, OperationOutput>;
589
+ }>;
590
+ /** Name matching the bound connection. */
591
+ connectionName: string;
592
+ /** Brevo updated the sender. */
593
+ updated: StepTarget<MutationResult<OperationOutput>>;
594
+ /** Brevo did not find the sender. */
595
+ notFound?: StepTarget<MutationResult<OperationOutput>>;
596
+ /** Brevo conclusively rejected the request. */
597
+ providerRejected?: StepTarget<MutationResult<OperationOutput>>;
598
+ /** Local input or credentials are invalid. */
599
+ defect?: StepTarget<MutationResult<OperationOutput>>;
600
+ /** Accepted for compatibility; ignored because the operation is safe to repeat. */
601
+ maxSends?: number;
602
+ }
603
+ /** Build the updateSender Step from a named connection. */
604
+ declare function newUpdateSenderStep<StepInput, OperationInput = UpdateSenderInput, OperationOutput = SenderChangeResult>(configuration: UpdateSenderStepConfig<StepInput, OperationInput, OperationOutput>): MutationStep<StepInput, OperationInput, OperationOutput>;
605
+ /** Configuration for the deleteSender connector Step. */
606
+ interface DeleteSenderStepConfig<StepInput, OperationInput = DeleteSenderInput, OperationOutput = SenderChangeResult> extends Omit<MutationStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
607
+ /** Named connection supplying this operation. */
608
+ connection: Connection<{
609
+ deleteSender(): Mutation<OperationInput, OperationOutput>;
610
+ }>;
611
+ /** Name matching the bound connection. */
612
+ connectionName: string;
613
+ /** Brevo deleted the sender. */
614
+ deleted: StepTarget<MutationResult<OperationOutput>>;
615
+ /** Brevo did not find the sender. */
616
+ notFound?: StepTarget<MutationResult<OperationOutput>>;
617
+ /** Brevo conclusively rejected the request. */
618
+ providerRejected?: StepTarget<MutationResult<OperationOutput>>;
619
+ /** Local input or credentials are invalid. */
620
+ defect?: StepTarget<MutationResult<OperationOutput>>;
621
+ /** Accepted for compatibility; ignored because the operation is safe to repeat. */
622
+ maxSends?: number;
623
+ }
624
+ /** Build the deleteSender Step from a named connection. */
625
+ declare function newDeleteSenderStep<StepInput, OperationInput = DeleteSenderInput, OperationOutput = SenderChangeResult>(configuration: DeleteSenderStepConfig<StepInput, OperationInput, OperationOutput>): MutationStep<StepInput, OperationInput, OperationOutput>;
626
+ /** Configuration for the sendEmail connector Step. */
627
+ interface SendEmailStepConfig<StepInput, OperationInput = SendEmailInput, OperationOutput = EmailSendResult> extends Omit<MutationStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
628
+ /** Named connection supplying this operation. */
629
+ connection: Connection<{
630
+ sendEmail(): Mutation<OperationInput, OperationOutput>;
631
+ }>;
632
+ /** Name matching the bound connection. */
633
+ connectionName: string;
634
+ /** Brevo accepted the transactional email. */
635
+ sent: StepTarget<MutationResult<OperationOutput>>;
636
+ /** Brevo conclusively rejected the email. */
637
+ providerRejected?: StepTarget<MutationResult<OperationOutput>>;
638
+ /** Local input or credentials are invalid. */
639
+ defect?: StepTarget<MutationResult<OperationOutput>>;
640
+ /** The email may have been sent after the send cap. */
641
+ uncertain?: StepTarget<MutationResult<OperationOutput>>;
642
+ }
643
+ /** Build the sendEmail Step from a named connection. */
644
+ declare function newSendEmailStep<StepInput, OperationInput = SendEmailInput, OperationOutput = EmailSendResult>(configuration: SendEmailStepConfig<StepInput, OperationInput, OperationOutput>): MutationStep<StepInput, OperationInput, OperationOutput>;
645
+ /** Configuration for the sendTemplateEmail connector Step. */
646
+ interface SendTemplateEmailStepConfig<StepInput, OperationInput = SendTemplateEmailInput, OperationOutput = EmailSendResult> extends Omit<MutationStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
647
+ /** Named connection supplying this operation. */
648
+ connection: Connection<{
649
+ sendTemplateEmail(): Mutation<OperationInput, OperationOutput>;
650
+ }>;
651
+ /** Name matching the bound connection. */
652
+ connectionName: string;
653
+ /** Brevo accepted the template email. */
654
+ sent: StepTarget<MutationResult<OperationOutput>>;
655
+ /** Brevo conclusively rejected the email. */
656
+ providerRejected?: StepTarget<MutationResult<OperationOutput>>;
657
+ /** Local input or credentials are invalid. */
658
+ defect?: StepTarget<MutationResult<OperationOutput>>;
659
+ /** The email may have been sent after the send cap. */
660
+ uncertain?: StepTarget<MutationResult<OperationOutput>>;
661
+ }
662
+ /** Build the sendTemplateEmail Step from a named connection. */
663
+ declare function newSendTemplateEmailStep<StepInput, OperationInput = SendTemplateEmailInput, OperationOutput = EmailSendResult>(configuration: SendTemplateEmailStepConfig<StepInput, OperationInput, OperationOutput>): MutationStep<StepInput, OperationInput, OperationOutput>;
64
664
  /** Configuration for the createOrUpdateContact connector Step. */
65
665
  interface CreateOrUpdateContactStepConfig<StepInput, OperationInput = CreateOrUpdateContactInput, OperationOutput = ContactWriteResult> extends Omit<MutationStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
66
666
  /** Named connection supplying this operation. */
@@ -77,6 +677,8 @@ interface CreateOrUpdateContactStepConfig<StepInput, OperationInput = CreateOrUp
77
677
  invalidResponse?: StepTarget<MutationResult<OperationOutput>>;
78
678
  /** Local input or credentials are invalid. */
79
679
  defect?: StepTarget<MutationResult<OperationOutput>>;
680
+ /** Accepted for compatibility; ignored because the operation is safe to repeat. */
681
+ maxSends?: number;
80
682
  }
81
683
  /** Build the createOrUpdateContact Step from a named connection. */
82
684
  declare function newCreateOrUpdateContactStep<StepInput, OperationInput = CreateOrUpdateContactInput, OperationOutput = ContactWriteResult>(configuration: CreateOrUpdateContactStepConfig<StepInput, OperationInput, OperationOutput>): MutationStep<StepInput, OperationInput, OperationOutput>;
@@ -105,13 +707,116 @@ declare function newGetContactStep<StepInput, OperationInput = GetContactInput,
105
707
  /** Open a named Brevo connection declared in a Dex project. */
106
708
  declare function newProjectConnection(project: LoadedProject, connectionName: string): Connection<Operations>;
107
709
 
710
+ declare abstract class BrevoQuery {
711
+ protected readonly client: BrevoClient;
712
+ protected abstract readonly contract: QueryDefinition;
713
+ /** Bind the authenticated Brevo client. */
714
+ constructor(client: BrevoClient);
715
+ /** Return the generated operation contract. */
716
+ definition(): QueryDefinition;
717
+ }
718
+ declare abstract class BrevoMutation {
719
+ protected readonly client: BrevoClient;
720
+ protected abstract readonly contract: MutationDefinition;
721
+ /** Bind the authenticated Brevo client. */
722
+ constructor(client: BrevoClient);
723
+ /** Return the generated operation contract. */
724
+ definition(): MutationDefinition;
725
+ /** Return the stable Call ID for one logical mutation. */
726
+ idempotencyKey(callID: string): string;
727
+ }
728
+ /** Create a contact by email without updating an existing contact. */
729
+ declare class CreateContactOperation extends BrevoMutation implements Mutation<CreateContactInput, ContactWriteResult> {
730
+ protected readonly contract: MutationDefinition;
731
+ /** Run the operation through the authenticated client. */
732
+ invoke(call: Call, input: CreateContactInput): Promise<MutationAttempt<ContactWriteResult>>;
733
+ }
734
+ /** List one page of contact IDs and emails. */
735
+ declare class ListContactsOperation extends BrevoQuery implements Query<ListContactsInput, ContactsList> {
736
+ protected readonly contract: QueryDefinition;
737
+ /** Run the operation through the authenticated client. */
738
+ invoke(call: Call, input: ListContactsInput): Promise<QueryAttempt<ContactsList>>;
739
+ }
740
+ /** Set absolute attributes on a contact identified by email. */
741
+ declare class UpdateContactOperation extends BrevoMutation implements Mutation<UpdateContactInput, ContactChangeResult> {
742
+ protected readonly contract: MutationDefinition;
743
+ /** Run the operation through the authenticated client. */
744
+ invoke(call: Call, input: UpdateContactInput): Promise<MutationAttempt<ContactChangeResult>>;
745
+ }
746
+ /** Delete a contact identified by email. */
747
+ declare class DeleteContactOperation extends BrevoMutation implements Mutation<DeleteContactInput, ContactChangeResult> {
748
+ protected readonly contract: MutationDefinition;
749
+ /** Run the operation through the authenticated client. */
750
+ invoke(call: Call, input: DeleteContactInput): Promise<MutationAttempt<ContactChangeResult>>;
751
+ }
752
+ /** List contact attribute names, categories, and types. */
753
+ declare class ListAttributesOperation extends BrevoQuery implements Query<ListAttributesInput, AttributesList> {
754
+ protected readonly contract: QueryDefinition;
755
+ /** Run the operation through the authenticated client. */
756
+ invoke(call: Call, input: ListAttributesInput): Promise<QueryAttempt<AttributesList>>;
757
+ }
758
+ /** Create a contact attribute with its type, options, or formula. */
759
+ declare class CreateAttributeOperation extends BrevoMutation implements Mutation<CreateAttributeInput, AttributeChangeResult> {
760
+ protected readonly contract: MutationDefinition;
761
+ /** Run the operation through the authenticated client. */
762
+ invoke(call: Call, input: CreateAttributeInput): Promise<MutationAttempt<AttributeChangeResult>>;
763
+ }
764
+ /** Replace a contact attribute's choices or formula. */
765
+ declare class UpdateAttributeOperation extends BrevoMutation implements Mutation<UpdateAttributeInput, AttributeChangeResult> {
766
+ protected readonly contract: MutationDefinition;
767
+ /** Run the operation through the authenticated client. */
768
+ invoke(call: Call, input: UpdateAttributeInput): Promise<MutationAttempt<AttributeChangeResult>>;
769
+ }
770
+ /** Delete a contact attribute by category and name. */
771
+ declare class DeleteAttributeOperation extends BrevoMutation implements Mutation<DeleteAttributeInput, AttributeChangeResult> {
772
+ protected readonly contract: MutationDefinition;
773
+ /** Run the operation through the authenticated client. */
774
+ invoke(call: Call, input: DeleteAttributeInput): Promise<MutationAttempt<AttributeChangeResult>>;
775
+ }
776
+ /** List email sender IDs, names, addresses, and active status. */
777
+ declare class ListSendersOperation extends BrevoQuery implements Query<ListSendersInput, SendersList> {
778
+ protected readonly contract: QueryDefinition;
779
+ /** Run the operation through the authenticated client. */
780
+ invoke(call: Call, input: ListSendersInput): Promise<QueryAttempt<SendersList>>;
781
+ }
782
+ /** Create an email sender. Brevo sends an address verification message. */
783
+ declare class CreateSenderOperation extends BrevoMutation implements Mutation<CreateSenderInput, SenderChangeResult> {
784
+ protected readonly contract: MutationDefinition;
785
+ /** Run the operation through the authenticated client. */
786
+ invoke(call: Call, input: CreateSenderInput): Promise<MutationAttempt<SenderChangeResult>>;
787
+ }
788
+ /** Set an existing sender's display name. */
789
+ declare class UpdateSenderOperation extends BrevoMutation implements Mutation<UpdateSenderInput, SenderChangeResult> {
790
+ protected readonly contract: MutationDefinition;
791
+ /** Run the operation through the authenticated client. */
792
+ invoke(call: Call, input: UpdateSenderInput): Promise<MutationAttempt<SenderChangeResult>>;
793
+ }
794
+ /** Delete an email sender by numeric ID. */
795
+ declare class DeleteSenderOperation extends BrevoMutation implements Mutation<DeleteSenderInput, SenderChangeResult> {
796
+ protected readonly contract: MutationDefinition;
797
+ /** Run the operation through the authenticated client. */
798
+ invoke(call: Call, input: DeleteSenderInput): Promise<MutationAttempt<SenderChangeResult>>;
799
+ }
800
+ /** Send one transactional email with inline text or HTML content. */
801
+ declare class SendEmailOperation extends BrevoMutation implements Mutation<SendEmailInput, EmailSendResult> {
802
+ protected readonly contract: MutationDefinition;
803
+ /** Run the operation through the authenticated client. */
804
+ invoke(call: Call, input: SendEmailInput): Promise<MutationAttempt<EmailSendResult>>;
805
+ }
806
+ /** Send one transactional email from a configured Brevo template. */
807
+ declare class SendTemplateEmailOperation extends BrevoMutation implements Mutation<SendTemplateEmailInput, EmailSendResult> {
808
+ protected readonly contract: MutationDefinition;
809
+ /** Run the operation through the authenticated client. */
810
+ invoke(call: Call, input: SendTemplateEmailInput): Promise<MutationAttempt<EmailSendResult>>;
811
+ }
812
+
108
813
  /** Repeat-safe Brevo contact creation or absolute-attribute update. */
109
814
  declare class CreateOrUpdateContactOperation implements Mutation<CreateOrUpdateContactInput, ContactWriteResult> {
110
815
  private readonly client;
111
816
  /** Bind one authenticated client. */
112
817
  constructor(client: BrevoClient);
113
818
  /** Return the manifest definition. */
114
- definition(): _superdurable_connectors_sdk.QueryDefinition;
819
+ definition(): _superdurable_connectors_sdk.MutationDefinition;
115
820
  /** Use the stable Dex Call ID; Brevo has no idempotency header. */
116
821
  idempotencyKey(callId: string): string;
117
822
  /** Send and classify one contact upsert attempt. */
@@ -139,12 +844,22 @@ interface BrevoClientOptions {
139
844
  }
140
845
  /** One bounded provider exchange or a classified local or transport error. */
141
846
  type BrevoExchange = {
142
- response: ProviderResponse;
847
+ response: BrevoResponse;
143
848
  } | {
144
849
  failure: Failure;
145
850
  classification: 'defect' | 'invalidResponse' | 'retry';
146
851
  retryAfterMs: number;
147
852
  };
853
+ /** A bounded response, retaining headers when the response body could not be read. */
854
+ interface BrevoResponse extends ProviderResponse {
855
+ /** Failure that prevented reading the full body. */ bodyError?: 'tooLarge' | 'interrupted';
856
+ }
857
+ /** A credential or request construction failure before dispatch. */
858
+ interface BrevoRequestFailure {
859
+ /** Secret-safe failure for the requested operation. */ failure: Failure;
860
+ /** Legacy outcome category used by contact operations. */ classification: 'defect' | 'retry';
861
+ /** Local retry delay in milliseconds. */ retryAfterMs: number;
862
+ }
148
863
  /** Brevo HTTP client with immutable settings and per-call credential resolution. */
149
864
  declare class BrevoClient {
150
865
  private readonly baseUrl;
@@ -159,10 +874,42 @@ declare class BrevoClient {
159
874
  createOrUpdateContact(): CreateOrUpdateContactOperation;
160
875
  /** Bind the contact lookup. */
161
876
  getContact(): GetContactOperation;
877
+ /** Create a contact by email without updating an existing contact. */
878
+ createContact(): CreateContactOperation;
879
+ /** List one page of contact IDs and emails. */
880
+ listContacts(): ListContactsOperation;
881
+ /** Set absolute attributes on a contact identified by email. */
882
+ updateContact(): UpdateContactOperation;
883
+ /** Delete a contact identified by email. */
884
+ deleteContact(): DeleteContactOperation;
885
+ /** List contact attribute names, categories, and types. */
886
+ listAttributes(): ListAttributesOperation;
887
+ /** Create a contact attribute with its type, options, or formula. */
888
+ createAttribute(): CreateAttributeOperation;
889
+ /** Replace a contact attribute's choices or formula. */
890
+ updateAttribute(): UpdateAttributeOperation;
891
+ /** Delete a contact attribute by category and name. */
892
+ deleteAttribute(): DeleteAttributeOperation;
893
+ /** List email sender IDs, names, addresses, and active status. */
894
+ listSenders(): ListSendersOperation;
895
+ /** Create an email sender. Brevo sends an address verification message. */
896
+ createSender(): CreateSenderOperation;
897
+ /** Set an existing sender's display name. */
898
+ updateSender(): UpdateSenderOperation;
899
+ /** Delete an email sender by numeric ID. */
900
+ deleteSender(): DeleteSenderOperation;
901
+ /** Send one transactional email with inline text or HTML content. */
902
+ sendEmail(): SendEmailOperation;
903
+ /** Send one transactional email from a configured Brevo template. */
904
+ sendTemplateEmail(): SendTemplateEmailOperation;
162
905
  /** Send one authenticated request and classify transport failures. */
163
906
  exchange(call: Call, operation: string, method: string, path: string, body?: Uint8Array): Promise<BrevoExchange>;
907
+ /** Resolve credentials and build one request before dispatch. */
908
+ prepare(call: Call, operation: string, method: string, path: string, body?: Uint8Array): Promise<ProviderRequest | BrevoRequestFailure>;
909
+ /** Send one prepared request with the caller's deadline and preserve response status. */
910
+ sendPrepared(request: ProviderRequest, signal?: AbortSignal | undefined): Promise<BrevoResponse>;
164
911
  /** Parse a provider-directed retry delay. */
165
912
  retryAfter(response: ProviderResponse): number;
166
913
  }
167
914
 
168
- export { BrevoClient, type BrevoClientOptions, type BrevoRequestSender, Config, Connection, ConnectorID, Contact, ContactWriteResult, CreateOrUpdateContactBranch, CreateOrUpdateContactBranchDefect, CreateOrUpdateContactBranchInvalidResponse, CreateOrUpdateContactBranchProviderRejected, CreateOrUpdateContactBranchSaved, CreateOrUpdateContactDefinition, CreateOrUpdateContactInput, CreateOrUpdateContactMetadata, CreateOrUpdateContactOperation, type CreateOrUpdateContactStepConfig, Credentials, GetContactBranch, GetContactBranchDefect, GetContactBranchFound, GetContactBranchInvalidResponse, GetContactBranchNotFound, GetContactBranchProviderRejected, GetContactDefinition, GetContactInput, GetContactMetadata, GetContactOperation, type GetContactStepConfig, ProviderID, newCreateOrUpdateContactStep, newGetContactStep, newProjectConnection };
915
+ export { AttributeChangeResult, AttributesList, BrevoClient, type BrevoClientOptions, type BrevoRequestSender, Config, Connection, ConnectorID, Contact, ContactChangeResult, ContactWriteResult, ContactsList, CreateAttributeBranch, CreateAttributeBranchCreated, CreateAttributeBranchDefect, CreateAttributeBranchProviderRejected, CreateAttributeBranchUncertain, CreateAttributeDefinition, CreateAttributeInput, CreateAttributeMetadata, CreateAttributeOperation, type CreateAttributeStepConfig, CreateContactBranch, CreateContactBranchCreated, CreateContactBranchDefect, CreateContactBranchProviderRejected, CreateContactBranchUncertain, CreateContactDefinition, CreateContactInput, CreateContactMetadata, CreateContactOperation, type CreateContactStepConfig, CreateOrUpdateContactBranch, CreateOrUpdateContactBranchDefect, CreateOrUpdateContactBranchInvalidResponse, CreateOrUpdateContactBranchProviderRejected, CreateOrUpdateContactBranchSaved, CreateOrUpdateContactDefinition, CreateOrUpdateContactInput, CreateOrUpdateContactMetadata, CreateOrUpdateContactOperation, type CreateOrUpdateContactStepConfig, CreateSenderBranch, CreateSenderBranchCreated, CreateSenderBranchDefect, CreateSenderBranchProviderRejected, CreateSenderBranchUncertain, CreateSenderDefinition, CreateSenderInput, CreateSenderMetadata, CreateSenderOperation, type CreateSenderStepConfig, Credentials, DeleteAttributeBranch, DeleteAttributeBranchDefect, DeleteAttributeBranchDeleted, DeleteAttributeBranchNotFound, DeleteAttributeBranchProviderRejected, DeleteAttributeDefinition, DeleteAttributeInput, DeleteAttributeMetadata, DeleteAttributeOperation, type DeleteAttributeStepConfig, DeleteContactBranch, DeleteContactBranchDefect, DeleteContactBranchDeleted, DeleteContactBranchNotFound, DeleteContactBranchProviderRejected, DeleteContactDefinition, DeleteContactInput, DeleteContactMetadata, DeleteContactOperation, type DeleteContactStepConfig, DeleteSenderBranch, DeleteSenderBranchDefect, DeleteSenderBranchDeleted, DeleteSenderBranchNotFound, DeleteSenderBranchProviderRejected, DeleteSenderDefinition, DeleteSenderInput, DeleteSenderMetadata, DeleteSenderOperation, type DeleteSenderStepConfig, EmailSendResult, GetContactBranch, GetContactBranchDefect, GetContactBranchFound, GetContactBranchInvalidResponse, GetContactBranchNotFound, GetContactBranchProviderRejected, GetContactDefinition, GetContactInput, GetContactMetadata, GetContactOperation, type GetContactStepConfig, ListAttributesBranch, ListAttributesBranchDefect, ListAttributesBranchInvalidResponse, ListAttributesBranchListed, ListAttributesBranchProviderRejected, ListAttributesDefinition, ListAttributesInput, ListAttributesMetadata, ListAttributesOperation, type ListAttributesStepConfig, ListContactsBranch, ListContactsBranchDefect, ListContactsBranchInvalidResponse, ListContactsBranchListed, ListContactsBranchProviderRejected, ListContactsDefinition, ListContactsInput, ListContactsMetadata, ListContactsOperation, type ListContactsStepConfig, ListSendersBranch, ListSendersBranchDefect, ListSendersBranchInvalidResponse, ListSendersBranchListed, ListSendersBranchProviderRejected, ListSendersDefinition, ListSendersInput, ListSendersMetadata, ListSendersOperation, type ListSendersStepConfig, ProviderID, SendEmailBranch, SendEmailBranchDefect, SendEmailBranchProviderRejected, SendEmailBranchSent, SendEmailBranchUncertain, SendEmailDefinition, SendEmailInput, SendEmailMetadata, SendEmailOperation, type SendEmailStepConfig, SendTemplateEmailBranch, SendTemplateEmailBranchDefect, SendTemplateEmailBranchProviderRejected, SendTemplateEmailBranchSent, SendTemplateEmailBranchUncertain, SendTemplateEmailDefinition, SendTemplateEmailInput, SendTemplateEmailMetadata, SendTemplateEmailOperation, type SendTemplateEmailStepConfig, SenderChangeResult, SendersList, UpdateAttributeBranch, UpdateAttributeBranchDefect, UpdateAttributeBranchNotFound, UpdateAttributeBranchProviderRejected, UpdateAttributeBranchUpdated, UpdateAttributeDefinition, UpdateAttributeInput, UpdateAttributeMetadata, UpdateAttributeOperation, type UpdateAttributeStepConfig, UpdateContactBranch, UpdateContactBranchDefect, UpdateContactBranchNotFound, UpdateContactBranchProviderRejected, UpdateContactBranchUpdated, UpdateContactDefinition, UpdateContactInput, UpdateContactMetadata, UpdateContactOperation, type UpdateContactStepConfig, UpdateSenderBranch, UpdateSenderBranchDefect, UpdateSenderBranchNotFound, UpdateSenderBranchProviderRejected, UpdateSenderBranchUpdated, UpdateSenderDefinition, UpdateSenderInput, UpdateSenderMetadata, UpdateSenderOperation, type UpdateSenderStepConfig, newCreateAttributeStep, newCreateContactStep, newCreateOrUpdateContactStep, newCreateSenderStep, newDeleteAttributeStep, newDeleteContactStep, newDeleteSenderStep, newGetContactStep, newListAttributesStep, newListContactsStep, newListSendersStep, newProjectConnection, newSendEmailStep, newSendTemplateEmailStep, newUpdateAttributeStep, newUpdateContactStep, newUpdateSenderStep };