@superdurable/connector-constantcontact 0.1.0 → 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,6 +1,6 @@
1
- import { C as Config, a as Credentials, G as GetContactInput, b as ContactMetadata, c as Connection, O as Operations } from './connection-fYrNM2Oe.js';
2
- export { d as ConfigSchema, e as ContactMetadataSchema, f as CredentialSource, g as GetContactInputSchema, h as decodeCredentials, i as decodeSharedCredentials, n as newConnection, j as newConnectionWithOperations } from './connection-fYrNM2Oe.js';
3
- import { QueryDefinition, CredentialProvider, CredentialRefreshDriver, Query, Call, QueryAttempt, QueryStepConfig, QueryResult, QueryStep } from '@superdurable/connectors-sdk';
1
+ import { G as GetSegmentInput, S as SegmentMetadata, L as ListSegmentsInput, a as SegmentsPage, C as CreateSegmentInput, U as UpdateSegmentInput, D as DeleteSegmentInput, b as DeleteSegmentOutput, c as GetActivityInput, A as ActivityMetadata, d as ListActivitiesInput, e as ActivitiesPage, f as CreateContactInput, g as ContactMetadata, h as ListContactsInput, i as ContactsPage, j as UpdateContactInput, k as DeleteContactInput, l as DeleteContactOutput, m as GetContactListInput, n as ContactListMetadata, o as ListContactListsInput, p as ContactListsPage, q as CreateContactListInput, r as UpdateContactListInput, s as DeleteContactListInput, t as DeleteContactListOutput, u as Config, v as Credentials, w as GetContactInput, x as Connection, O as Operations } from './connection-B8OAb8aq.js';
2
+ export { y as ActivitiesPageSchema, z as ActivityMetadataSchema, B as ConfigSchema, E as ContactListMetadataSchema, F as ContactListsPageSchema, H as ContactMetadataSchema, I as ContactsPageSchema, J as CreateContactInputSchema, K as CreateContactListInputSchema, M as CreateSegmentInputSchema, N as CredentialMaterialError, P as CredentialSource, Q as DeleteContactInputSchema, R as DeleteContactListInputSchema, T as DeleteContactListOutputSchema, V as DeleteContactOutputSchema, W as DeleteSegmentInputSchema, X as DeleteSegmentOutputSchema, Y as GetActivityInputSchema, Z as GetContactInputSchema, _ as GetContactListInputSchema, $ as GetSegmentInputSchema, a0 as ListActivitiesInputSchema, a1 as ListContactListsInputSchema, a2 as ListContactsInputSchema, a3 as ListSegmentsInputSchema, a4 as SegmentMetadataSchema, a5 as SegmentsPageSchema, a6 as SignedInteger, a7 as UpdateContactInputSchema, a8 as UpdateContactListInputSchema, a9 as UpdateSegmentInputSchema, aa as decodeCredentials, ab as decodeSharedCredentials, ac as decodeSignedInteger, ad as exactIntegerJSONCodec, ae as isCredentialMaterialError, af as newConnection, ag as newConnectionWithOperations, ah as parseExactIntegerJSON, ai as parseJSONNumberTokens } from './connection-B8OAb8aq.js';
3
+ import { MutationDefinition, QueryDefinition, Call, QueryAttempt, MutationAttempt, Failure, Query, Mutation, CallID, IdempotencyKey, CredentialProvider, CredentialRefreshDriver, MutationStepConfig, MutationResult, QueryStepConfig, QueryResult, MutationStep, QueryStep } from '@superdurable/connectors-sdk';
4
4
  import { ProviderRequest, ProviderResponse } from '@superdurable/connectors-sdk/providerhttp';
5
5
  import { LoadedProject } from '@superdurable/connectors-sdk/projectconfig';
6
6
  import { StepTarget } from '@superdurable/dex';
@@ -10,6 +10,277 @@ import 'zod';
10
10
  declare const ConnectorID = "constantcontact";
11
11
  /** Provider identity for named connections. */
12
12
  declare const ProviderID = "constantcontact";
13
+ /** Branch IDs for getSegment. */
14
+ declare const GetSegmentBranch: {
15
+ readonly Found: "found";
16
+ readonly NotFound: "notFound";
17
+ readonly ProviderRejected: "providerRejected";
18
+ readonly InvalidResponse: "invalidResponse";
19
+ readonly Defect: "defect";
20
+ };
21
+ /** Constant Contact returned the segment. */
22
+ declare const GetSegmentBranchFound: "found";
23
+ /** The segment does not exist. */
24
+ declare const GetSegmentBranchNotFound: "notFound";
25
+ /** Constant Contact rejected the lookup. */
26
+ declare const GetSegmentBranchProviderRejected: "providerRejected";
27
+ /** Constant Contact returned malformed segment JSON. */
28
+ declare const GetSegmentBranchInvalidResponse: "invalidResponse";
29
+ /** Input or credentials are invalid. */
30
+ declare const GetSegmentBranchDefect: "defect";
31
+ /** Manifest definition for getSegment. */
32
+ declare const GetSegmentDefinition: QueryDefinition;
33
+ /** Manifest metadata for getSegment. */
34
+ declare const GetSegmentMetadata: {
35
+ readonly kind: "query";
36
+ readonly idempotency: "none";
37
+ readonly authorization: "required";
38
+ };
39
+ /** Branch IDs for listSegments. */
40
+ declare const ListSegmentsBranch: {
41
+ readonly Listed: "listed";
42
+ readonly ProviderRejected: "providerRejected";
43
+ readonly InvalidResponse: "invalidResponse";
44
+ readonly Defect: "defect";
45
+ };
46
+ /** Constant Contact returned a segment page. */
47
+ declare const ListSegmentsBranchListed: "listed";
48
+ /** Constant Contact rejected the lookup. */
49
+ declare const ListSegmentsBranchProviderRejected: "providerRejected";
50
+ /** Constant Contact returned malformed segment JSON. */
51
+ declare const ListSegmentsBranchInvalidResponse: "invalidResponse";
52
+ /** Input or credentials are invalid. */
53
+ declare const ListSegmentsBranchDefect: "defect";
54
+ /** Manifest definition for listSegments. */
55
+ declare const ListSegmentsDefinition: QueryDefinition;
56
+ /** Manifest metadata for listSegments. */
57
+ declare const ListSegmentsMetadata: {
58
+ readonly kind: "query";
59
+ readonly idempotency: "none";
60
+ readonly authorization: "required";
61
+ };
62
+ /** Branch IDs for createSegment. */
63
+ declare const CreateSegmentBranch: {
64
+ readonly Created: "created";
65
+ readonly Uncertain: "uncertain";
66
+ readonly AlreadyExists: "alreadyExists";
67
+ readonly ProviderRejected: "providerRejected";
68
+ readonly Defect: "defect";
69
+ };
70
+ /** Constant Contact created the segment. */
71
+ declare const CreateSegmentBranchCreated: "created";
72
+ /** An earlier segment creation could not be confirmed after the send cap. */
73
+ declare const CreateSegmentBranchUncertain: "uncertain";
74
+ /** No longer selected; a 409 cannot prove this segment was not created. */
75
+ declare const CreateSegmentBranchAlreadyExists: "alreadyExists";
76
+ /** Constant Contact rejected creation. */
77
+ declare const CreateSegmentBranchProviderRejected: "providerRejected";
78
+ /** Input or credentials are invalid. */
79
+ declare const CreateSegmentBranchDefect: "defect";
80
+ /** Manifest definition for createSegment. */
81
+ declare const CreateSegmentDefinition: MutationDefinition;
82
+ /** Manifest metadata for createSegment. */
83
+ declare const CreateSegmentMetadata: {
84
+ readonly kind: "mutation";
85
+ readonly idempotency: "required";
86
+ readonly authorization: "required";
87
+ };
88
+ /** Branch IDs for updateSegment. */
89
+ declare const UpdateSegmentBranch: {
90
+ readonly Updated: "updated";
91
+ readonly NotFound: "notFound";
92
+ readonly ProviderRejected: "providerRejected";
93
+ readonly InvalidResponse: "invalidResponse";
94
+ readonly Defect: "defect";
95
+ };
96
+ /** Constant Contact updated the segment. */
97
+ declare const UpdateSegmentBranchUpdated: "updated";
98
+ /** The segment does not exist. */
99
+ declare const UpdateSegmentBranchNotFound: "notFound";
100
+ /** Constant Contact rejected the update. */
101
+ declare const UpdateSegmentBranchProviderRejected: "providerRejected";
102
+ /** Constant Contact returned malformed segment JSON. */
103
+ declare const UpdateSegmentBranchInvalidResponse: "invalidResponse";
104
+ /** Input or credentials are invalid. */
105
+ declare const UpdateSegmentBranchDefect: "defect";
106
+ /** Manifest definition for updateSegment. */
107
+ declare const UpdateSegmentDefinition: MutationDefinition;
108
+ /** Manifest metadata for updateSegment. */
109
+ declare const UpdateSegmentMetadata: {
110
+ readonly kind: "mutation";
111
+ readonly idempotency: "required";
112
+ readonly authorization: "required";
113
+ };
114
+ /** Branch IDs for deleteSegment. */
115
+ declare const DeleteSegmentBranch: {
116
+ readonly Deleted: "deleted";
117
+ readonly NotFound: "notFound";
118
+ readonly ProviderRejected: "providerRejected";
119
+ readonly Defect: "defect";
120
+ };
121
+ /** Constant Contact deleted the segment. */
122
+ declare const DeleteSegmentBranchDeleted: "deleted";
123
+ /** The segment does not exist. */
124
+ declare const DeleteSegmentBranchNotFound: "notFound";
125
+ /** Constant Contact rejected deletion. */
126
+ declare const DeleteSegmentBranchProviderRejected: "providerRejected";
127
+ /** Input or credentials are invalid. */
128
+ declare const DeleteSegmentBranchDefect: "defect";
129
+ /** Manifest definition for deleteSegment. */
130
+ declare const DeleteSegmentDefinition: MutationDefinition;
131
+ /** Manifest metadata for deleteSegment. */
132
+ declare const DeleteSegmentMetadata: {
133
+ readonly kind: "mutation";
134
+ readonly idempotency: "required";
135
+ readonly authorization: "required";
136
+ };
137
+ /** Branch IDs for getActivity. */
138
+ declare const GetActivityBranch: {
139
+ readonly Found: "found";
140
+ readonly NotFound: "notFound";
141
+ readonly ProviderRejected: "providerRejected";
142
+ readonly InvalidResponse: "invalidResponse";
143
+ readonly Defect: "defect";
144
+ };
145
+ /** Constant Contact returned the activity. */
146
+ declare const GetActivityBranchFound: "found";
147
+ /** The activity is absent or older than ten days. */
148
+ declare const GetActivityBranchNotFound: "notFound";
149
+ /** Constant Contact rejected the lookup. */
150
+ declare const GetActivityBranchProviderRejected: "providerRejected";
151
+ /** Constant Contact returned malformed activity JSON. */
152
+ declare const GetActivityBranchInvalidResponse: "invalidResponse";
153
+ /** Input or credentials are invalid. */
154
+ declare const GetActivityBranchDefect: "defect";
155
+ /** Manifest definition for getActivity. */
156
+ declare const GetActivityDefinition: QueryDefinition;
157
+ /** Manifest metadata for getActivity. */
158
+ declare const GetActivityMetadata: {
159
+ readonly kind: "query";
160
+ readonly idempotency: "none";
161
+ readonly authorization: "required";
162
+ };
163
+ /** Branch IDs for listActivities. */
164
+ declare const ListActivitiesBranch: {
165
+ readonly Listed: "listed";
166
+ readonly ProviderRejected: "providerRejected";
167
+ readonly InvalidResponse: "invalidResponse";
168
+ readonly Defect: "defect";
169
+ };
170
+ /** Constant Contact returned recent activities. */
171
+ declare const ListActivitiesBranchListed: "listed";
172
+ /** Constant Contact rejected the lookup. */
173
+ declare const ListActivitiesBranchProviderRejected: "providerRejected";
174
+ /** Constant Contact returned malformed activity JSON. */
175
+ declare const ListActivitiesBranchInvalidResponse: "invalidResponse";
176
+ /** Credentials are invalid. */
177
+ declare const ListActivitiesBranchDefect: "defect";
178
+ /** Manifest definition for listActivities. */
179
+ declare const ListActivitiesDefinition: QueryDefinition;
180
+ /** Manifest metadata for listActivities. */
181
+ declare const ListActivitiesMetadata: {
182
+ readonly kind: "query";
183
+ readonly idempotency: "none";
184
+ readonly authorization: "required";
185
+ };
186
+ /** Branch IDs for createContact. */
187
+ declare const CreateContactBranch: {
188
+ readonly Created: "created";
189
+ readonly Uncertain: "uncertain";
190
+ readonly AlreadyExists: "alreadyExists";
191
+ readonly ProviderRejected: "providerRejected";
192
+ readonly Defect: "defect";
193
+ };
194
+ /** Constant Contact created the contact. */
195
+ declare const CreateContactBranchCreated: "created";
196
+ /** An earlier contact creation could not be confirmed after the send cap. */
197
+ declare const CreateContactBranchUncertain: "uncertain";
198
+ /** No longer selected; a 409 cannot prove this contact was not created. */
199
+ declare const CreateContactBranchAlreadyExists: "alreadyExists";
200
+ /** Constant Contact rejected the creation. */
201
+ declare const CreateContactBranchProviderRejected: "providerRejected";
202
+ /** Local input or connection credentials are invalid. */
203
+ declare const CreateContactBranchDefect: "defect";
204
+ /** Manifest definition for createContact. */
205
+ declare const CreateContactDefinition: MutationDefinition;
206
+ /** Manifest metadata for createContact. */
207
+ declare const CreateContactMetadata: {
208
+ readonly kind: "mutation";
209
+ readonly idempotency: "required";
210
+ readonly authorization: "required";
211
+ };
212
+ /** Branch IDs for listContacts. */
213
+ declare const ListContactsBranch: {
214
+ readonly Listed: "listed";
215
+ readonly ProviderRejected: "providerRejected";
216
+ readonly InvalidResponse: "invalidResponse";
217
+ readonly Defect: "defect";
218
+ };
219
+ /** Constant Contact returned a page of contacts. */
220
+ declare const ListContactsBranchListed: "listed";
221
+ /** Constant Contact rejected the search. */
222
+ declare const ListContactsBranchProviderRejected: "providerRejected";
223
+ /** Constant Contact returned malformed or oversized JSON. */
224
+ declare const ListContactsBranchInvalidResponse: "invalidResponse";
225
+ /** Local input or connection credentials are invalid. */
226
+ declare const ListContactsBranchDefect: "defect";
227
+ /** Manifest definition for listContacts. */
228
+ declare const ListContactsDefinition: QueryDefinition;
229
+ /** Manifest metadata for listContacts. */
230
+ declare const ListContactsMetadata: {
231
+ readonly kind: "query";
232
+ readonly idempotency: "none";
233
+ readonly authorization: "required";
234
+ };
235
+ /** Branch IDs for updateContact. */
236
+ declare const UpdateContactBranch: {
237
+ readonly Updated: "updated";
238
+ readonly NotFound: "notFound";
239
+ readonly ProviderRejected: "providerRejected";
240
+ readonly InvalidResponse: "invalidResponse";
241
+ readonly Defect: "defect";
242
+ };
243
+ /** Constant Contact updated the contact. */
244
+ declare const UpdateContactBranchUpdated: "updated";
245
+ /** The contact does not exist. */
246
+ declare const UpdateContactBranchNotFound: "notFound";
247
+ /** Constant Contact rejected the update. */
248
+ declare const UpdateContactBranchProviderRejected: "providerRejected";
249
+ /** Constant Contact returned malformed contact JSON. */
250
+ declare const UpdateContactBranchInvalidResponse: "invalidResponse";
251
+ /** Input or credentials are invalid. */
252
+ declare const UpdateContactBranchDefect: "defect";
253
+ /** Manifest definition for updateContact. */
254
+ declare const UpdateContactDefinition: MutationDefinition;
255
+ /** Manifest metadata for updateContact. */
256
+ declare const UpdateContactMetadata: {
257
+ readonly kind: "mutation";
258
+ readonly idempotency: "required";
259
+ readonly authorization: "required";
260
+ };
261
+ /** Branch IDs for deleteContact. */
262
+ declare const DeleteContactBranch: {
263
+ readonly Deleted: "deleted";
264
+ readonly NotFound: "notFound";
265
+ readonly ProviderRejected: "providerRejected";
266
+ readonly Defect: "defect";
267
+ };
268
+ /** Constant Contact deleted the contact. */
269
+ declare const DeleteContactBranchDeleted: "deleted";
270
+ /** The contact was already absent. */
271
+ declare const DeleteContactBranchNotFound: "notFound";
272
+ /** Constant Contact rejected the deletion. */
273
+ declare const DeleteContactBranchProviderRejected: "providerRejected";
274
+ /** Local input or connection credentials are invalid. */
275
+ declare const DeleteContactBranchDefect: "defect";
276
+ /** Manifest definition for deleteContact. */
277
+ declare const DeleteContactDefinition: MutationDefinition;
278
+ /** Manifest metadata for deleteContact. */
279
+ declare const DeleteContactMetadata: {
280
+ readonly kind: "mutation";
281
+ readonly idempotency: "required";
282
+ readonly authorization: "required";
283
+ };
13
284
  /** Branch IDs for getContact. */
14
285
  declare const GetContactBranch: {
15
286
  readonly Found: "found";
@@ -36,12 +307,335 @@ declare const GetContactMetadata: {
36
307
  readonly idempotency: "none";
37
308
  readonly authorization: "required";
38
309
  };
310
+ /** Branch IDs for getContactList. */
311
+ declare const GetContactListBranch: {
312
+ readonly Found: "found";
313
+ readonly NotFound: "notFound";
314
+ readonly ProviderRejected: "providerRejected";
315
+ readonly InvalidResponse: "invalidResponse";
316
+ readonly Defect: "defect";
317
+ };
318
+ /** Constant Contact returned the list. */
319
+ declare const GetContactListBranchFound: "found";
320
+ /** The list does not exist. */
321
+ declare const GetContactListBranchNotFound: "notFound";
322
+ /** Constant Contact rejected the request. */
323
+ declare const GetContactListBranchProviderRejected: "providerRejected";
324
+ /** Constant Contact returned malformed or oversized JSON. */
325
+ declare const GetContactListBranchInvalidResponse: "invalidResponse";
326
+ /** Local input or connection credentials are invalid. */
327
+ declare const GetContactListBranchDefect: "defect";
328
+ /** Manifest definition for getContactList. */
329
+ declare const GetContactListDefinition: QueryDefinition;
330
+ /** Manifest metadata for getContactList. */
331
+ declare const GetContactListMetadata: {
332
+ readonly kind: "query";
333
+ readonly idempotency: "none";
334
+ readonly authorization: "required";
335
+ };
336
+ /** Branch IDs for listContactLists. */
337
+ declare const ListContactListsBranch: {
338
+ readonly Listed: "listed";
339
+ readonly ProviderRejected: "providerRejected";
340
+ readonly InvalidResponse: "invalidResponse";
341
+ readonly Defect: "defect";
342
+ };
343
+ /** Constant Contact returned a page of lists. */
344
+ declare const ListContactListsBranchListed: "listed";
345
+ /** Constant Contact rejected the request. */
346
+ declare const ListContactListsBranchProviderRejected: "providerRejected";
347
+ /** Constant Contact returned malformed or oversized JSON. */
348
+ declare const ListContactListsBranchInvalidResponse: "invalidResponse";
349
+ /** Local input or connection credentials are invalid. */
350
+ declare const ListContactListsBranchDefect: "defect";
351
+ /** Manifest definition for listContactLists. */
352
+ declare const ListContactListsDefinition: QueryDefinition;
353
+ /** Manifest metadata for listContactLists. */
354
+ declare const ListContactListsMetadata: {
355
+ readonly kind: "query";
356
+ readonly idempotency: "none";
357
+ readonly authorization: "required";
358
+ };
359
+ /** Branch IDs for createContactList. */
360
+ declare const CreateContactListBranch: {
361
+ readonly Created: "created";
362
+ readonly Uncertain: "uncertain";
363
+ readonly AlreadyExists: "alreadyExists";
364
+ readonly ProviderRejected: "providerRejected";
365
+ readonly Defect: "defect";
366
+ };
367
+ /** Constant Contact created the list. */
368
+ declare const CreateContactListBranchCreated: "created";
369
+ /** An earlier list creation could not be confirmed after the send cap. */
370
+ declare const CreateContactListBranchUncertain: "uncertain";
371
+ /** No longer selected; a 409 cannot prove this list was not created. */
372
+ declare const CreateContactListBranchAlreadyExists: "alreadyExists";
373
+ /** Constant Contact rejected the request. */
374
+ declare const CreateContactListBranchProviderRejected: "providerRejected";
375
+ /** Local input or connection credentials are invalid. */
376
+ declare const CreateContactListBranchDefect: "defect";
377
+ /** Manifest definition for createContactList. */
378
+ declare const CreateContactListDefinition: MutationDefinition;
379
+ /** Manifest metadata for createContactList. */
380
+ declare const CreateContactListMetadata: {
381
+ readonly kind: "mutation";
382
+ readonly idempotency: "required";
383
+ readonly authorization: "required";
384
+ };
385
+ /** Branch IDs for updateContactList. */
386
+ declare const UpdateContactListBranch: {
387
+ readonly Updated: "updated";
388
+ readonly NotFound: "notFound";
389
+ readonly ProviderRejected: "providerRejected";
390
+ readonly Defect: "defect";
391
+ };
392
+ /** Constant Contact updated the list. */
393
+ declare const UpdateContactListBranchUpdated: "updated";
394
+ /** The list does not exist. */
395
+ declare const UpdateContactListBranchNotFound: "notFound";
396
+ /** Constant Contact rejected the request. */
397
+ declare const UpdateContactListBranchProviderRejected: "providerRejected";
398
+ /** Local input or connection credentials are invalid. */
399
+ declare const UpdateContactListBranchDefect: "defect";
400
+ /** Manifest definition for updateContactList. */
401
+ declare const UpdateContactListDefinition: MutationDefinition;
402
+ /** Manifest metadata for updateContactList. */
403
+ declare const UpdateContactListMetadata: {
404
+ readonly kind: "mutation";
405
+ readonly idempotency: "required";
406
+ readonly authorization: "required";
407
+ };
408
+ /** Branch IDs for deleteContactList. */
409
+ declare const DeleteContactListBranch: {
410
+ readonly Accepted: "accepted";
411
+ readonly NotFound: "notFound";
412
+ readonly ProviderRejected: "providerRejected";
413
+ readonly Defect: "defect";
414
+ };
415
+ /** Constant Contact accepted the list deletion. */
416
+ declare const DeleteContactListBranchAccepted: "accepted";
417
+ /** The list does not exist. */
418
+ declare const DeleteContactListBranchNotFound: "notFound";
419
+ /** Constant Contact rejected the request. */
420
+ declare const DeleteContactListBranchProviderRejected: "providerRejected";
421
+ /** Local input or connection credentials are invalid. */
422
+ declare const DeleteContactListBranchDefect: "defect";
423
+ /** Manifest definition for deleteContactList. */
424
+ declare const DeleteContactListDefinition: MutationDefinition;
425
+ /** Manifest metadata for deleteContactList. */
426
+ declare const DeleteContactListMetadata: {
427
+ readonly kind: "mutation";
428
+ readonly idempotency: "required";
429
+ readonly authorization: "required";
430
+ };
431
+
432
+ type Kind = Failure['kind'];
433
+ type Document = Record<string, unknown>;
434
+ type Decode<Output> = (raw: unknown) => Output;
435
+ interface Outcome {
436
+ branch?: string;
437
+ kind: Kind;
438
+ message: string;
439
+ delay?: number;
440
+ }
441
+ declare abstract class Operation<Input, Output> {
442
+ protected readonly client: ConstantContactClient;
443
+ protected abstract readonly operation: string;
444
+ constructor(client: ConstantContactClient);
445
+ abstract invoke(call: Call, input: Input): Promise<QueryAttempt<Output> | MutationAttempt<Output>>;
446
+ protected failure(outcome: Outcome): Failure;
447
+ }
448
+ declare abstract class ReadOperation<Input, Output> extends Operation<Input, Output> implements Query<Input, Output> {
449
+ protected abstract readonly contract: QueryDefinition;
450
+ abstract invoke(call: Call, input: Input): Promise<QueryAttempt<Output>>;
451
+ /** Return the manifest-generated Query definition. */
452
+ definition(): QueryDefinition;
453
+ protected defect(empty: Output, message: string): QueryAttempt<Output>;
454
+ protected read(call: Call, path: string, branch: string, empty: Output, decode: Decode<Output>): Promise<QueryAttempt<Output>>;
455
+ }
456
+ interface WriteRequest<Output> {
457
+ method: 'PUT' | 'DELETE';
458
+ path: string;
459
+ branch: string;
460
+ empty: Output;
461
+ decode: Decode<Output>;
462
+ statuses: readonly number[];
463
+ payload?: Document;
464
+ protocolDelay?: boolean;
465
+ }
466
+ interface Creation<Input, Output> {
467
+ path: string;
468
+ payload: Document;
469
+ empty: Output;
470
+ decode: Decode<Output>;
471
+ input: Input;
472
+ readBack: (client: ConstantContactClient, call: Call, input: Input) => Promise<Output | undefined>;
473
+ identify: (output: Output) => string;
474
+ subject: 'contact' | 'list' | 'segment';
475
+ }
476
+ declare abstract class WriteOperation<Input, Output> extends Operation<Input, Output> implements Mutation<Input, Output> {
477
+ protected abstract readonly contract: MutationDefinition;
478
+ abstract invoke(call: Call, input: Input): Promise<MutationAttempt<Output>>;
479
+ /** Return the manifest-generated Mutation definition. */
480
+ definition(): MutationDefinition;
481
+ /** Correlate every attempt with its original call. */
482
+ idempotencyKey(callId: CallID): IdempotencyKey;
483
+ protected outcome(empty: Output, outcome: Outcome): MutationAttempt<Output>;
484
+ protected defect(empty: Output, message: string): MutationAttempt<Output>;
485
+ protected write(call: Call, request: WriteRequest<Output>): Promise<MutationAttempt<Output>>;
486
+ protected create(call: Call, request: Creation<Input, Output>): Promise<MutationAttempt<Output>>;
487
+ }
488
+ /** Read a segment and its complete selection criteria. */
489
+ declare class GetSegmentOperation extends ReadOperation<GetSegmentInput, SegmentMetadata> {
490
+ protected readonly contract: QueryDefinition;
491
+ protected readonly operation = "getSegment";
492
+ /** Bind the provider client. */
493
+ constructor(client: ConstantContactClient);
494
+ /** Read a segment and its complete selection criteria. */
495
+ invoke(call: Call, input: GetSegmentInput): Promise<QueryAttempt<SegmentMetadata>>;
496
+ }
497
+ /** Read a bounded page of segments. */
498
+ declare class ListSegmentsOperation extends ReadOperation<ListSegmentsInput, SegmentsPage> {
499
+ protected readonly contract: QueryDefinition;
500
+ protected readonly operation = "listSegments";
501
+ /** Bind the provider client. */
502
+ constructor(client: ConstantContactClient);
503
+ /** Read a bounded page of segments. */
504
+ invoke(call: Call, input: ListSegmentsInput): Promise<QueryAttempt<SegmentsPage>>;
505
+ }
506
+ /** Create a uniquely named segment with complete selection criteria. */
507
+ declare class CreateSegmentOperation extends WriteOperation<CreateSegmentInput, SegmentMetadata> {
508
+ protected readonly contract: MutationDefinition;
509
+ protected readonly operation = "createSegment";
510
+ /** Bind the provider client. */
511
+ constructor(client: ConstantContactClient);
512
+ /** Create a uniquely named segment with complete selection criteria. */
513
+ invoke(call: Call, input: CreateSegmentInput): Promise<MutationAttempt<SegmentMetadata>>;
514
+ }
515
+ /** Replace one segment's name and complete criteria. */
516
+ declare class UpdateSegmentOperation extends WriteOperation<UpdateSegmentInput, SegmentMetadata> {
517
+ protected readonly contract: MutationDefinition;
518
+ protected readonly operation = "updateSegment";
519
+ /** Bind the provider client. */
520
+ constructor(client: ConstantContactClient);
521
+ /** Replace one segment's name and complete criteria. */
522
+ invoke(call: Call, input: UpdateSegmentInput): Promise<MutationAttempt<SegmentMetadata>>;
523
+ }
524
+ /** Remove one segment from the active collection. */
525
+ declare class DeleteSegmentOperation extends WriteOperation<DeleteSegmentInput, DeleteSegmentOutput> {
526
+ protected readonly contract: MutationDefinition;
527
+ protected readonly operation = "deleteSegment";
528
+ /** Bind the provider client. */
529
+ constructor(client: ConstantContactClient);
530
+ /** Remove one segment from the active collection. */
531
+ invoke(call: Call, input: DeleteSegmentInput): Promise<MutationAttempt<DeleteSegmentOutput>>;
532
+ }
533
+ /** Read the current state and progress of one recent bulk activity. */
534
+ declare class GetActivityOperation extends ReadOperation<GetActivityInput, ActivityMetadata> {
535
+ protected readonly contract: QueryDefinition;
536
+ protected readonly operation = "getActivity";
537
+ /** Bind the provider client. */
538
+ constructor(client: ConstantContactClient);
539
+ /** Read the current state and progress of one recent bulk activity. */
540
+ invoke(call: Call, input: GetActivityInput): Promise<QueryAttempt<ActivityMetadata>>;
541
+ }
542
+ /** Read recent bulk activity states retained for ten days. */
543
+ declare class ListActivitiesOperation extends ReadOperation<ListActivitiesInput, ActivitiesPage> {
544
+ protected readonly contract: QueryDefinition;
545
+ protected readonly operation = "listActivities";
546
+ /** Bind the provider client. */
547
+ constructor(client: ConstantContactClient);
548
+ /** Read recent bulk activity states retained for ten days. */
549
+ invoke(call: Call, input: ListActivitiesInput): Promise<QueryAttempt<ActivitiesPage>>;
550
+ }
551
+ /** Create an email contact with its documented permission and source. */
552
+ declare class CreateContactOperation extends WriteOperation<CreateContactInput, ContactMetadata> {
553
+ protected readonly contract: MutationDefinition;
554
+ protected readonly operation = "createContact";
555
+ /** Bind the provider client. */
556
+ constructor(client: ConstantContactClient);
557
+ /** Create an email contact with its documented permission and source. */
558
+ invoke(call: Call, input: CreateContactInput): Promise<MutationAttempt<ContactMetadata>>;
559
+ }
560
+ /** Search contacts by exact email or page through the contact collection. */
561
+ declare class ListContactsOperation extends ReadOperation<ListContactsInput, ContactsPage> {
562
+ protected readonly contract: QueryDefinition;
563
+ protected readonly operation = "listContacts";
564
+ /** Bind the provider client. */
565
+ constructor(client: ConstantContactClient);
566
+ /** Search contacts by exact email or page through the contact collection. */
567
+ invoke(call: Call, input: ListContactsInput): Promise<QueryAttempt<ContactsPage>>;
568
+ }
569
+ /** Update selected contact name and company fields while preserving other core fields. */
570
+ declare class UpdateContactOperation extends WriteOperation<UpdateContactInput, ContactMetadata> {
571
+ protected readonly contract: MutationDefinition;
572
+ protected readonly operation = "updateContact";
573
+ /** Bind the provider client. */
574
+ constructor(client: ConstantContactClient);
575
+ /** Update selected contact name and company fields while preserving other core fields. */
576
+ invoke(call: Call, input: UpdateContactInput): Promise<MutationAttempt<ContactMetadata>>;
577
+ }
578
+ /** Delete one contact and its list memberships by contact UUID. */
579
+ declare class DeleteContactOperation extends WriteOperation<DeleteContactInput, DeleteContactOutput> {
580
+ protected readonly contract: MutationDefinition;
581
+ protected readonly operation = "deleteContact";
582
+ /** Bind the provider client. */
583
+ constructor(client: ConstantContactClient);
584
+ /** Delete one contact and its list memberships by contact UUID. */
585
+ invoke(call: Call, input: DeleteContactInput): Promise<MutationAttempt<DeleteContactOutput>>;
586
+ }
587
+ /** Read one contact list by UUID. */
588
+ declare class GetContactListOperation extends ReadOperation<GetContactListInput, ContactListMetadata> {
589
+ protected readonly contract: QueryDefinition;
590
+ protected readonly operation = "getContactList";
591
+ /** Bind the provider client. */
592
+ constructor(client: ConstantContactClient);
593
+ /** Read one contact list by UUID. */
594
+ invoke(call: Call, input: GetContactListInput): Promise<QueryAttempt<ContactListMetadata>>;
595
+ }
596
+ /** Read a bounded collection of contact lists, optionally by exact name. */
597
+ declare class ListContactListsOperation extends ReadOperation<ListContactListsInput, ContactListsPage> {
598
+ protected readonly contract: QueryDefinition;
599
+ protected readonly operation = "listContactLists";
600
+ /** Bind the provider client. */
601
+ constructor(client: ConstantContactClient);
602
+ /** Read a bounded collection of contact lists, optionally by exact name. */
603
+ invoke(call: Call, input: ListContactListsInput): Promise<QueryAttempt<ContactListsPage>>;
604
+ }
605
+ /** Create one named contact list. */
606
+ declare class CreateContactListOperation extends WriteOperation<CreateContactListInput, ContactListMetadata> {
607
+ protected readonly contract: MutationDefinition;
608
+ protected readonly operation = "createContactList";
609
+ /** Bind the provider client. */
610
+ constructor(client: ConstantContactClient);
611
+ /** Create one named contact list. */
612
+ invoke(call: Call, input: CreateContactListInput): Promise<MutationAttempt<ContactListMetadata>>;
613
+ }
614
+ /** Replace the name, description, and favorite state of one list. */
615
+ declare class UpdateContactListOperation extends WriteOperation<UpdateContactListInput, ContactListMetadata> {
616
+ protected readonly contract: MutationDefinition;
617
+ protected readonly operation = "updateContactList";
618
+ /** Bind the provider client. */
619
+ constructor(client: ConstantContactClient);
620
+ /** Replace the name, description, and favorite state of one list. */
621
+ invoke(call: Call, input: UpdateContactListInput): Promise<MutationAttempt<ContactListMetadata>>;
622
+ }
623
+ /** Request asynchronous deletion of one contact list. */
624
+ declare class DeleteContactListOperation extends WriteOperation<DeleteContactListInput, DeleteContactListOutput> {
625
+ protected readonly contract: MutationDefinition;
626
+ protected readonly operation = "deleteContactList";
627
+ /** Bind the provider client. */
628
+ constructor(client: ConstantContactClient);
629
+ /** Request asynchronous deletion of one contact list. */
630
+ invoke(call: Call, input: DeleteContactListInput): Promise<MutationAttempt<DeleteContactListOutput>>;
631
+ }
39
632
 
40
633
  /** Injectable provider transport and token refresh dependencies. */
41
634
  interface ConstantContactClientOptions {
42
635
  /** Provider sender; omitted uses the SDK transport. */ send?: (request: ProviderRequest) => Promise<ProviderResponse>;
43
636
  /** OAuth refresh driver; omitted uses the manifest declaration. */ refreshDriver?: CredentialRefreshDriver<Credentials>;
44
637
  }
638
+ /** Bounded provider HTTP outcome. */
45
639
  interface Exchange {
46
640
  status: number;
47
641
  body: Uint8Array;
@@ -59,8 +653,47 @@ declare class ConstantContactClient {
59
653
  /** Validate configuration without contacting the provider. */
60
654
  constructor(config: Config, credentials: CredentialProvider<Credentials>, options?: ConstantContactClientOptions);
61
655
  /** Bind the getContact Query. */ getContact(): GetContactOperation;
656
+ /** Bind the getSegment operation. */
657
+ getSegment(): GetSegmentOperation;
658
+ /** Bind the listSegments operation. */
659
+ listSegments(): ListSegmentsOperation;
660
+ /** Bind the createSegment operation. */
661
+ createSegment(): CreateSegmentOperation;
662
+ /** Bind the updateSegment operation. */
663
+ updateSegment(): UpdateSegmentOperation;
664
+ /** Bind the deleteSegment operation. */
665
+ deleteSegment(): DeleteSegmentOperation;
666
+ /** Bind the getActivity operation. */
667
+ getActivity(): GetActivityOperation;
668
+ /** Bind the listActivities operation. */
669
+ listActivities(): ListActivitiesOperation;
670
+ /** Bind the createContact operation. */
671
+ createContact(): CreateContactOperation;
672
+ /** Bind the listContacts operation. */
673
+ listContacts(): ListContactsOperation;
674
+ /** Bind the updateContact operation. */
675
+ updateContact(): UpdateContactOperation;
676
+ /** Bind the deleteContact operation. */
677
+ deleteContact(): DeleteContactOperation;
678
+ /** Bind the getContactList operation. */
679
+ getContactList(): GetContactListOperation;
680
+ /** Bind the listContactLists operation. */
681
+ listContactLists(): ListContactListsOperation;
682
+ /** Bind the createContactList operation. */
683
+ createContactList(): CreateContactListOperation;
684
+ /** Bind the updateContactList operation. */
685
+ updateContactList(): UpdateContactListOperation;
686
+ /** Bind the deleteContactList operation. */
687
+ deleteContactList(): DeleteContactListOperation;
688
+ /** Resolve the authorization token before a provider request. */
689
+ private resolveToken;
62
690
  /** Resolve a token and send one bounded contact read. */
63
691
  get(call: Call, contactID: string): Promise<Exchange>;
692
+ /** Send a bounded Constant Contact V3 request. */
693
+ request(call: Call, method: string, path: string, payload?: object): Promise<Exchange>;
694
+ /** Resolve credentials before a dispatch fence and bind them to one request. */
695
+ prepareRequest(call: Call, method: string, path: string, payload?: object): Promise<Exchange | ((signal: AbortSignal | undefined) => Promise<Exchange>)>;
696
+ private sendAuthorized;
64
697
  }
65
698
  /** Read one contact's selected identity and email fields. */
66
699
  declare class GetContactOperation implements Query<GetContactInput, ContactMetadata> {
@@ -74,6 +707,235 @@ declare class GetContactOperation implements Query<GetContactInput, ContactMetad
74
707
  /** Open one renewable Constant Contact connection from Dex project configuration. */
75
708
  declare function newProjectConnection(project: LoadedProject, connectionName: string, options?: ConstantContactClientOptions): Connection<Operations>;
76
709
 
710
+ /** Configuration for the getSegment connector Step. */
711
+ interface GetSegmentStepConfig<StepInput, OperationInput = GetSegmentInput, OperationOutput = SegmentMetadata> extends Omit<QueryStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
712
+ /** Named connection supplying this operation. */
713
+ connection: Connection<{
714
+ getSegment(): Query<OperationInput, OperationOutput>;
715
+ }>;
716
+ /** Name matching the bound connection. */
717
+ connectionName: string;
718
+ /** Constant Contact returned the segment. */
719
+ found: StepTarget<QueryResult<OperationOutput>>;
720
+ /** The segment does not exist. */
721
+ notFound?: StepTarget<QueryResult<OperationOutput>>;
722
+ /** Constant Contact rejected the lookup. */
723
+ providerRejected?: StepTarget<QueryResult<OperationOutput>>;
724
+ /** Constant Contact returned malformed segment JSON. */
725
+ invalidResponse?: StepTarget<QueryResult<OperationOutput>>;
726
+ /** Input or credentials are invalid. */
727
+ defect?: StepTarget<QueryResult<OperationOutput>>;
728
+ }
729
+ /** Build the getSegment Step from a named connection. */
730
+ declare function newGetSegmentStep<StepInput, OperationInput = GetSegmentInput, OperationOutput = SegmentMetadata>(configuration: GetSegmentStepConfig<StepInput, OperationInput, OperationOutput>): QueryStep<StepInput, OperationInput, OperationOutput>;
731
+ /** Configuration for the listSegments connector Step. */
732
+ interface ListSegmentsStepConfig<StepInput, OperationInput = ListSegmentsInput, OperationOutput = SegmentsPage> extends Omit<QueryStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
733
+ /** Named connection supplying this operation. */
734
+ connection: Connection<{
735
+ listSegments(): Query<OperationInput, OperationOutput>;
736
+ }>;
737
+ /** Name matching the bound connection. */
738
+ connectionName: string;
739
+ /** Constant Contact returned a segment page. */
740
+ listed: StepTarget<QueryResult<OperationOutput>>;
741
+ /** Constant Contact rejected the lookup. */
742
+ providerRejected?: StepTarget<QueryResult<OperationOutput>>;
743
+ /** Constant Contact returned malformed segment JSON. */
744
+ invalidResponse?: StepTarget<QueryResult<OperationOutput>>;
745
+ /** Input or credentials are invalid. */
746
+ defect?: StepTarget<QueryResult<OperationOutput>>;
747
+ }
748
+ /** Build the listSegments Step from a named connection. */
749
+ declare function newListSegmentsStep<StepInput, OperationInput = ListSegmentsInput, OperationOutput = SegmentsPage>(configuration: ListSegmentsStepConfig<StepInput, OperationInput, OperationOutput>): QueryStep<StepInput, OperationInput, OperationOutput>;
750
+ /** Configuration for the createSegment connector Step. */
751
+ interface CreateSegmentStepConfig<StepInput, OperationInput = CreateSegmentInput, OperationOutput = SegmentMetadata> extends Omit<MutationStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
752
+ /** Named connection supplying this operation. */
753
+ connection: Connection<{
754
+ createSegment(): Mutation<OperationInput, OperationOutput>;
755
+ }>;
756
+ /** Name matching the bound connection. */
757
+ connectionName: string;
758
+ /** Constant Contact created the segment. */
759
+ created: StepTarget<MutationResult<OperationOutput>>;
760
+ /** An earlier segment creation could not be confirmed after the send cap. */
761
+ uncertain?: StepTarget<MutationResult<OperationOutput>>;
762
+ /** No longer selected; a 409 cannot prove this segment was not created. */
763
+ alreadyExists?: StepTarget<MutationResult<OperationOutput>>;
764
+ /** Constant Contact rejected creation. */
765
+ providerRejected?: StepTarget<MutationResult<OperationOutput>>;
766
+ /** Input or credentials are invalid. */
767
+ defect?: StepTarget<MutationResult<OperationOutput>>;
768
+ }
769
+ /** Build the createSegment Step from a named connection. */
770
+ declare function newCreateSegmentStep<StepInput, OperationInput = CreateSegmentInput, OperationOutput = SegmentMetadata>(configuration: CreateSegmentStepConfig<StepInput, OperationInput, OperationOutput>): MutationStep<StepInput, OperationInput, OperationOutput>;
771
+ /** Configuration for the updateSegment connector Step. */
772
+ interface UpdateSegmentStepConfig<StepInput, OperationInput = UpdateSegmentInput, OperationOutput = SegmentMetadata> extends Omit<MutationStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
773
+ /** Named connection supplying this operation. */
774
+ connection: Connection<{
775
+ updateSegment(): Mutation<OperationInput, OperationOutput>;
776
+ }>;
777
+ /** Name matching the bound connection. */
778
+ connectionName: string;
779
+ /** Constant Contact updated the segment. */
780
+ updated: StepTarget<MutationResult<OperationOutput>>;
781
+ /** The segment does not exist. */
782
+ notFound?: StepTarget<MutationResult<OperationOutput>>;
783
+ /** Constant Contact rejected the update. */
784
+ providerRejected?: StepTarget<MutationResult<OperationOutput>>;
785
+ /** Constant Contact returned malformed segment JSON. */
786
+ invalidResponse?: StepTarget<MutationResult<OperationOutput>>;
787
+ /** Input or credentials are invalid. */
788
+ defect?: StepTarget<MutationResult<OperationOutput>>;
789
+ /** Accepted for compatibility; ignored because the operation is safe to repeat. */
790
+ maxSends?: number;
791
+ }
792
+ /** Build the updateSegment Step from a named connection. */
793
+ declare function newUpdateSegmentStep<StepInput, OperationInput = UpdateSegmentInput, OperationOutput = SegmentMetadata>(configuration: UpdateSegmentStepConfig<StepInput, OperationInput, OperationOutput>): MutationStep<StepInput, OperationInput, OperationOutput>;
794
+ /** Configuration for the deleteSegment connector Step. */
795
+ interface DeleteSegmentStepConfig<StepInput, OperationInput = DeleteSegmentInput, OperationOutput = DeleteSegmentOutput> extends Omit<MutationStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
796
+ /** Named connection supplying this operation. */
797
+ connection: Connection<{
798
+ deleteSegment(): Mutation<OperationInput, OperationOutput>;
799
+ }>;
800
+ /** Name matching the bound connection. */
801
+ connectionName: string;
802
+ /** Constant Contact deleted the segment. */
803
+ deleted: StepTarget<MutationResult<OperationOutput>>;
804
+ /** The segment does not exist. */
805
+ notFound?: StepTarget<MutationResult<OperationOutput>>;
806
+ /** Constant Contact rejected deletion. */
807
+ providerRejected?: StepTarget<MutationResult<OperationOutput>>;
808
+ /** Input or credentials are invalid. */
809
+ defect?: StepTarget<MutationResult<OperationOutput>>;
810
+ /** Accepted for compatibility; ignored because the operation is safe to repeat. */
811
+ maxSends?: number;
812
+ }
813
+ /** Build the deleteSegment Step from a named connection. */
814
+ declare function newDeleteSegmentStep<StepInput, OperationInput = DeleteSegmentInput, OperationOutput = DeleteSegmentOutput>(configuration: DeleteSegmentStepConfig<StepInput, OperationInput, OperationOutput>): MutationStep<StepInput, OperationInput, OperationOutput>;
815
+ /** Configuration for the getActivity connector Step. */
816
+ interface GetActivityStepConfig<StepInput, OperationInput = GetActivityInput, OperationOutput = ActivityMetadata> extends Omit<QueryStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
817
+ /** Named connection supplying this operation. */
818
+ connection: Connection<{
819
+ getActivity(): Query<OperationInput, OperationOutput>;
820
+ }>;
821
+ /** Name matching the bound connection. */
822
+ connectionName: string;
823
+ /** Constant Contact returned the activity. */
824
+ found: StepTarget<QueryResult<OperationOutput>>;
825
+ /** The activity is absent or older than ten days. */
826
+ notFound?: StepTarget<QueryResult<OperationOutput>>;
827
+ /** Constant Contact rejected the lookup. */
828
+ providerRejected?: StepTarget<QueryResult<OperationOutput>>;
829
+ /** Constant Contact returned malformed activity JSON. */
830
+ invalidResponse?: StepTarget<QueryResult<OperationOutput>>;
831
+ /** Input or credentials are invalid. */
832
+ defect?: StepTarget<QueryResult<OperationOutput>>;
833
+ }
834
+ /** Build the getActivity Step from a named connection. */
835
+ declare function newGetActivityStep<StepInput, OperationInput = GetActivityInput, OperationOutput = ActivityMetadata>(configuration: GetActivityStepConfig<StepInput, OperationInput, OperationOutput>): QueryStep<StepInput, OperationInput, OperationOutput>;
836
+ /** Configuration for the listActivities connector Step. */
837
+ interface ListActivitiesStepConfig<StepInput, OperationInput = ListActivitiesInput, OperationOutput = ActivitiesPage> extends Omit<QueryStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
838
+ /** Named connection supplying this operation. */
839
+ connection: Connection<{
840
+ listActivities(): Query<OperationInput, OperationOutput>;
841
+ }>;
842
+ /** Name matching the bound connection. */
843
+ connectionName: string;
844
+ /** Constant Contact returned recent activities. */
845
+ listed: StepTarget<QueryResult<OperationOutput>>;
846
+ /** Constant Contact rejected the lookup. */
847
+ providerRejected?: StepTarget<QueryResult<OperationOutput>>;
848
+ /** Constant Contact returned malformed activity JSON. */
849
+ invalidResponse?: StepTarget<QueryResult<OperationOutput>>;
850
+ /** Credentials are invalid. */
851
+ defect?: StepTarget<QueryResult<OperationOutput>>;
852
+ }
853
+ /** Build the listActivities Step from a named connection. */
854
+ declare function newListActivitiesStep<StepInput, OperationInput = ListActivitiesInput, OperationOutput = ActivitiesPage>(configuration: ListActivitiesStepConfig<StepInput, OperationInput, OperationOutput>): QueryStep<StepInput, OperationInput, OperationOutput>;
855
+ /** Configuration for the createContact connector Step. */
856
+ interface CreateContactStepConfig<StepInput, OperationInput = CreateContactInput, OperationOutput = ContactMetadata> extends Omit<MutationStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
857
+ /** Named connection supplying this operation. */
858
+ connection: Connection<{
859
+ createContact(): Mutation<OperationInput, OperationOutput>;
860
+ }>;
861
+ /** Name matching the bound connection. */
862
+ connectionName: string;
863
+ /** Constant Contact created the contact. */
864
+ created: StepTarget<MutationResult<OperationOutput>>;
865
+ /** An earlier contact creation could not be confirmed after the send cap. */
866
+ uncertain?: StepTarget<MutationResult<OperationOutput>>;
867
+ /** No longer selected; a 409 cannot prove this contact was not created. */
868
+ alreadyExists?: StepTarget<MutationResult<OperationOutput>>;
869
+ /** Constant Contact rejected the creation. */
870
+ providerRejected?: StepTarget<MutationResult<OperationOutput>>;
871
+ /** Local input or connection credentials are invalid. */
872
+ defect?: StepTarget<MutationResult<OperationOutput>>;
873
+ }
874
+ /** Build the createContact Step from a named connection. */
875
+ declare function newCreateContactStep<StepInput, OperationInput = CreateContactInput, OperationOutput = ContactMetadata>(configuration: CreateContactStepConfig<StepInput, OperationInput, OperationOutput>): MutationStep<StepInput, OperationInput, OperationOutput>;
876
+ /** Configuration for the listContacts connector Step. */
877
+ interface ListContactsStepConfig<StepInput, OperationInput = ListContactsInput, OperationOutput = ContactsPage> extends Omit<QueryStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
878
+ /** Named connection supplying this operation. */
879
+ connection: Connection<{
880
+ listContacts(): Query<OperationInput, OperationOutput>;
881
+ }>;
882
+ /** Name matching the bound connection. */
883
+ connectionName: string;
884
+ /** Constant Contact returned a page of contacts. */
885
+ listed: StepTarget<QueryResult<OperationOutput>>;
886
+ /** Constant Contact rejected the search. */
887
+ providerRejected?: StepTarget<QueryResult<OperationOutput>>;
888
+ /** Constant Contact returned malformed or oversized JSON. */
889
+ invalidResponse?: StepTarget<QueryResult<OperationOutput>>;
890
+ /** Local input or connection credentials are invalid. */
891
+ defect?: StepTarget<QueryResult<OperationOutput>>;
892
+ }
893
+ /** Build the listContacts Step from a named connection. */
894
+ declare function newListContactsStep<StepInput, OperationInput = ListContactsInput, OperationOutput = ContactsPage>(configuration: ListContactsStepConfig<StepInput, OperationInput, OperationOutput>): QueryStep<StepInput, OperationInput, OperationOutput>;
895
+ /** Configuration for the updateContact connector Step. */
896
+ interface UpdateContactStepConfig<StepInput, OperationInput = UpdateContactInput, OperationOutput = ContactMetadata> extends Omit<MutationStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
897
+ /** Named connection supplying this operation. */
898
+ connection: Connection<{
899
+ updateContact(): Mutation<OperationInput, OperationOutput>;
900
+ }>;
901
+ /** Name matching the bound connection. */
902
+ connectionName: string;
903
+ /** Constant Contact updated the contact. */
904
+ updated: StepTarget<MutationResult<OperationOutput>>;
905
+ /** The contact does not exist. */
906
+ notFound?: StepTarget<MutationResult<OperationOutput>>;
907
+ /** Constant Contact rejected the update. */
908
+ providerRejected?: StepTarget<MutationResult<OperationOutput>>;
909
+ /** Constant Contact returned malformed contact JSON. */
910
+ invalidResponse?: StepTarget<MutationResult<OperationOutput>>;
911
+ /** Input or credentials are invalid. */
912
+ defect?: StepTarget<MutationResult<OperationOutput>>;
913
+ /** Accepted for compatibility; ignored because the operation is safe to repeat. */
914
+ maxSends?: number;
915
+ }
916
+ /** Build the updateContact Step from a named connection. */
917
+ declare function newUpdateContactStep<StepInput, OperationInput = UpdateContactInput, OperationOutput = ContactMetadata>(configuration: UpdateContactStepConfig<StepInput, OperationInput, OperationOutput>): MutationStep<StepInput, OperationInput, OperationOutput>;
918
+ /** Configuration for the deleteContact connector Step. */
919
+ interface DeleteContactStepConfig<StepInput, OperationInput = DeleteContactInput, OperationOutput = DeleteContactOutput> extends Omit<MutationStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
920
+ /** Named connection supplying this operation. */
921
+ connection: Connection<{
922
+ deleteContact(): Mutation<OperationInput, OperationOutput>;
923
+ }>;
924
+ /** Name matching the bound connection. */
925
+ connectionName: string;
926
+ /** Constant Contact deleted the contact. */
927
+ deleted: StepTarget<MutationResult<OperationOutput>>;
928
+ /** The contact was already absent. */
929
+ notFound?: StepTarget<MutationResult<OperationOutput>>;
930
+ /** Constant Contact rejected the deletion. */
931
+ providerRejected?: StepTarget<MutationResult<OperationOutput>>;
932
+ /** Local input or connection credentials are invalid. */
933
+ defect?: StepTarget<MutationResult<OperationOutput>>;
934
+ /** Accepted for compatibility; ignored because the operation is safe to repeat. */
935
+ maxSends?: number;
936
+ }
937
+ /** Build the deleteContact Step from a named connection. */
938
+ declare function newDeleteContactStep<StepInput, OperationInput = DeleteContactInput, OperationOutput = DeleteContactOutput>(configuration: DeleteContactStepConfig<StepInput, OperationInput, OperationOutput>): MutationStep<StepInput, OperationInput, OperationOutput>;
77
939
  /** Configuration for the getContact connector Step. */
78
940
  interface GetContactStepConfig<StepInput, OperationInput = GetContactInput, OperationOutput = ContactMetadata> extends Omit<QueryStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
79
941
  /** Named connection supplying this operation. */
@@ -95,5 +957,108 @@ interface GetContactStepConfig<StepInput, OperationInput = GetContactInput, Oper
95
957
  }
96
958
  /** Build the getContact Step from a named connection. */
97
959
  declare function newGetContactStep<StepInput, OperationInput = GetContactInput, OperationOutput = ContactMetadata>(configuration: GetContactStepConfig<StepInput, OperationInput, OperationOutput>): QueryStep<StepInput, OperationInput, OperationOutput>;
960
+ /** Configuration for the getContactList connector Step. */
961
+ interface GetContactListStepConfig<StepInput, OperationInput = GetContactListInput, OperationOutput = ContactListMetadata> extends Omit<QueryStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
962
+ /** Named connection supplying this operation. */
963
+ connection: Connection<{
964
+ getContactList(): Query<OperationInput, OperationOutput>;
965
+ }>;
966
+ /** Name matching the bound connection. */
967
+ connectionName: string;
968
+ /** Constant Contact returned the list. */
969
+ found: StepTarget<QueryResult<OperationOutput>>;
970
+ /** The list does not exist. */
971
+ notFound?: StepTarget<QueryResult<OperationOutput>>;
972
+ /** Constant Contact rejected the request. */
973
+ providerRejected?: StepTarget<QueryResult<OperationOutput>>;
974
+ /** Constant Contact returned malformed or oversized JSON. */
975
+ invalidResponse?: StepTarget<QueryResult<OperationOutput>>;
976
+ /** Local input or connection credentials are invalid. */
977
+ defect?: StepTarget<QueryResult<OperationOutput>>;
978
+ }
979
+ /** Build the getContactList Step from a named connection. */
980
+ declare function newGetContactListStep<StepInput, OperationInput = GetContactListInput, OperationOutput = ContactListMetadata>(configuration: GetContactListStepConfig<StepInput, OperationInput, OperationOutput>): QueryStep<StepInput, OperationInput, OperationOutput>;
981
+ /** Configuration for the listContactLists connector Step. */
982
+ interface ListContactListsStepConfig<StepInput, OperationInput = ListContactListsInput, OperationOutput = ContactListsPage> extends Omit<QueryStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
983
+ /** Named connection supplying this operation. */
984
+ connection: Connection<{
985
+ listContactLists(): Query<OperationInput, OperationOutput>;
986
+ }>;
987
+ /** Name matching the bound connection. */
988
+ connectionName: string;
989
+ /** Constant Contact returned a page of lists. */
990
+ listed: StepTarget<QueryResult<OperationOutput>>;
991
+ /** Constant Contact rejected the request. */
992
+ providerRejected?: StepTarget<QueryResult<OperationOutput>>;
993
+ /** Constant Contact returned malformed or oversized JSON. */
994
+ invalidResponse?: StepTarget<QueryResult<OperationOutput>>;
995
+ /** Local input or connection credentials are invalid. */
996
+ defect?: StepTarget<QueryResult<OperationOutput>>;
997
+ }
998
+ /** Build the listContactLists Step from a named connection. */
999
+ declare function newListContactListsStep<StepInput, OperationInput = ListContactListsInput, OperationOutput = ContactListsPage>(configuration: ListContactListsStepConfig<StepInput, OperationInput, OperationOutput>): QueryStep<StepInput, OperationInput, OperationOutput>;
1000
+ /** Configuration for the createContactList connector Step. */
1001
+ interface CreateContactListStepConfig<StepInput, OperationInput = CreateContactListInput, OperationOutput = ContactListMetadata> extends Omit<MutationStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
1002
+ /** Named connection supplying this operation. */
1003
+ connection: Connection<{
1004
+ createContactList(): Mutation<OperationInput, OperationOutput>;
1005
+ }>;
1006
+ /** Name matching the bound connection. */
1007
+ connectionName: string;
1008
+ /** Constant Contact created the list. */
1009
+ created: StepTarget<MutationResult<OperationOutput>>;
1010
+ /** An earlier list creation could not be confirmed after the send cap. */
1011
+ uncertain?: StepTarget<MutationResult<OperationOutput>>;
1012
+ /** No longer selected; a 409 cannot prove this list was not created. */
1013
+ alreadyExists?: StepTarget<MutationResult<OperationOutput>>;
1014
+ /** Constant Contact rejected the request. */
1015
+ providerRejected?: StepTarget<MutationResult<OperationOutput>>;
1016
+ /** Local input or connection credentials are invalid. */
1017
+ defect?: StepTarget<MutationResult<OperationOutput>>;
1018
+ }
1019
+ /** Build the createContactList Step from a named connection. */
1020
+ declare function newCreateContactListStep<StepInput, OperationInput = CreateContactListInput, OperationOutput = ContactListMetadata>(configuration: CreateContactListStepConfig<StepInput, OperationInput, OperationOutput>): MutationStep<StepInput, OperationInput, OperationOutput>;
1021
+ /** Configuration for the updateContactList connector Step. */
1022
+ interface UpdateContactListStepConfig<StepInput, OperationInput = UpdateContactListInput, OperationOutput = ContactListMetadata> extends Omit<MutationStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
1023
+ /** Named connection supplying this operation. */
1024
+ connection: Connection<{
1025
+ updateContactList(): Mutation<OperationInput, OperationOutput>;
1026
+ }>;
1027
+ /** Name matching the bound connection. */
1028
+ connectionName: string;
1029
+ /** Constant Contact updated the list. */
1030
+ updated: StepTarget<MutationResult<OperationOutput>>;
1031
+ /** The list does not exist. */
1032
+ notFound?: StepTarget<MutationResult<OperationOutput>>;
1033
+ /** Constant Contact rejected the request. */
1034
+ providerRejected?: StepTarget<MutationResult<OperationOutput>>;
1035
+ /** Local input or connection credentials are invalid. */
1036
+ defect?: StepTarget<MutationResult<OperationOutput>>;
1037
+ /** Accepted for compatibility; ignored because the operation is safe to repeat. */
1038
+ maxSends?: number;
1039
+ }
1040
+ /** Build the updateContactList Step from a named connection. */
1041
+ declare function newUpdateContactListStep<StepInput, OperationInput = UpdateContactListInput, OperationOutput = ContactListMetadata>(configuration: UpdateContactListStepConfig<StepInput, OperationInput, OperationOutput>): MutationStep<StepInput, OperationInput, OperationOutput>;
1042
+ /** Configuration for the deleteContactList connector Step. */
1043
+ interface DeleteContactListStepConfig<StepInput, OperationInput = DeleteContactListInput, OperationOutput = DeleteContactListOutput> extends Omit<MutationStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
1044
+ /** Named connection supplying this operation. */
1045
+ connection: Connection<{
1046
+ deleteContactList(): Mutation<OperationInput, OperationOutput>;
1047
+ }>;
1048
+ /** Name matching the bound connection. */
1049
+ connectionName: string;
1050
+ /** Constant Contact accepted the list deletion. */
1051
+ accepted: StepTarget<MutationResult<OperationOutput>>;
1052
+ /** The list does not exist. */
1053
+ notFound?: StepTarget<MutationResult<OperationOutput>>;
1054
+ /** Constant Contact rejected the request. */
1055
+ providerRejected?: StepTarget<MutationResult<OperationOutput>>;
1056
+ /** Local input or connection credentials are invalid. */
1057
+ defect?: StepTarget<MutationResult<OperationOutput>>;
1058
+ /** Accepted for compatibility; ignored because the operation is safe to repeat. */
1059
+ maxSends?: number;
1060
+ }
1061
+ /** Build the deleteContactList Step from a named connection. */
1062
+ declare function newDeleteContactListStep<StepInput, OperationInput = DeleteContactListInput, OperationOutput = DeleteContactListOutput>(configuration: DeleteContactListStepConfig<StepInput, OperationInput, OperationOutput>): MutationStep<StepInput, OperationInput, OperationOutput>;
98
1063
 
99
- export { Config, Connection, ConnectorID, ConstantContactClient, type ConstantContactClientOptions, ContactMetadata, Credentials, GetContactBranch, GetContactBranchDefect, GetContactBranchFound, GetContactBranchInvalidResponse, GetContactBranchNotFound, GetContactBranchProviderRejected, GetContactDefinition, GetContactInput, GetContactMetadata, GetContactOperation, type GetContactStepConfig, ProviderID, newGetContactStep, newProjectConnection };
1064
+ export { ActivitiesPage, ActivityMetadata, Config, Connection, ConnectorID, ConstantContactClient, type ConstantContactClientOptions, ContactListMetadata, ContactListsPage, ContactMetadata, ContactsPage, CreateContactBranch, CreateContactBranchAlreadyExists, CreateContactBranchCreated, CreateContactBranchDefect, CreateContactBranchProviderRejected, CreateContactBranchUncertain, CreateContactDefinition, CreateContactInput, CreateContactListBranch, CreateContactListBranchAlreadyExists, CreateContactListBranchCreated, CreateContactListBranchDefect, CreateContactListBranchProviderRejected, CreateContactListBranchUncertain, CreateContactListDefinition, CreateContactListInput, CreateContactListMetadata, CreateContactListOperation, type CreateContactListStepConfig, CreateContactMetadata, CreateContactOperation, type CreateContactStepConfig, CreateSegmentBranch, CreateSegmentBranchAlreadyExists, CreateSegmentBranchCreated, CreateSegmentBranchDefect, CreateSegmentBranchProviderRejected, CreateSegmentBranchUncertain, CreateSegmentDefinition, CreateSegmentInput, CreateSegmentMetadata, CreateSegmentOperation, type CreateSegmentStepConfig, Credentials, DeleteContactBranch, DeleteContactBranchDefect, DeleteContactBranchDeleted, DeleteContactBranchNotFound, DeleteContactBranchProviderRejected, DeleteContactDefinition, DeleteContactInput, DeleteContactListBranch, DeleteContactListBranchAccepted, DeleteContactListBranchDefect, DeleteContactListBranchNotFound, DeleteContactListBranchProviderRejected, DeleteContactListDefinition, DeleteContactListInput, DeleteContactListMetadata, DeleteContactListOperation, DeleteContactListOutput, type DeleteContactListStepConfig, DeleteContactMetadata, DeleteContactOperation, DeleteContactOutput, type DeleteContactStepConfig, DeleteSegmentBranch, DeleteSegmentBranchDefect, DeleteSegmentBranchDeleted, DeleteSegmentBranchNotFound, DeleteSegmentBranchProviderRejected, DeleteSegmentDefinition, DeleteSegmentInput, DeleteSegmentMetadata, DeleteSegmentOperation, DeleteSegmentOutput, type DeleteSegmentStepConfig, type Exchange, GetActivityBranch, GetActivityBranchDefect, GetActivityBranchFound, GetActivityBranchInvalidResponse, GetActivityBranchNotFound, GetActivityBranchProviderRejected, GetActivityDefinition, GetActivityInput, GetActivityMetadata, GetActivityOperation, type GetActivityStepConfig, GetContactBranch, GetContactBranchDefect, GetContactBranchFound, GetContactBranchInvalidResponse, GetContactBranchNotFound, GetContactBranchProviderRejected, GetContactDefinition, GetContactInput, GetContactListBranch, GetContactListBranchDefect, GetContactListBranchFound, GetContactListBranchInvalidResponse, GetContactListBranchNotFound, GetContactListBranchProviderRejected, GetContactListDefinition, GetContactListInput, GetContactListMetadata, GetContactListOperation, type GetContactListStepConfig, GetContactMetadata, GetContactOperation, type GetContactStepConfig, GetSegmentBranch, GetSegmentBranchDefect, GetSegmentBranchFound, GetSegmentBranchInvalidResponse, GetSegmentBranchNotFound, GetSegmentBranchProviderRejected, GetSegmentDefinition, GetSegmentInput, GetSegmentMetadata, GetSegmentOperation, type GetSegmentStepConfig, ListActivitiesBranch, ListActivitiesBranchDefect, ListActivitiesBranchInvalidResponse, ListActivitiesBranchListed, ListActivitiesBranchProviderRejected, ListActivitiesDefinition, ListActivitiesInput, ListActivitiesMetadata, ListActivitiesOperation, type ListActivitiesStepConfig, ListContactListsBranch, ListContactListsBranchDefect, ListContactListsBranchInvalidResponse, ListContactListsBranchListed, ListContactListsBranchProviderRejected, ListContactListsDefinition, ListContactListsInput, ListContactListsMetadata, ListContactListsOperation, type ListContactListsStepConfig, ListContactsBranch, ListContactsBranchDefect, ListContactsBranchInvalidResponse, ListContactsBranchListed, ListContactsBranchProviderRejected, ListContactsDefinition, ListContactsInput, ListContactsMetadata, ListContactsOperation, type ListContactsStepConfig, ListSegmentsBranch, ListSegmentsBranchDefect, ListSegmentsBranchInvalidResponse, ListSegmentsBranchListed, ListSegmentsBranchProviderRejected, ListSegmentsDefinition, ListSegmentsInput, ListSegmentsMetadata, ListSegmentsOperation, type ListSegmentsStepConfig, ProviderID, SegmentMetadata, SegmentsPage, UpdateContactBranch, UpdateContactBranchDefect, UpdateContactBranchInvalidResponse, UpdateContactBranchNotFound, UpdateContactBranchProviderRejected, UpdateContactBranchUpdated, UpdateContactDefinition, UpdateContactInput, UpdateContactListBranch, UpdateContactListBranchDefect, UpdateContactListBranchNotFound, UpdateContactListBranchProviderRejected, UpdateContactListBranchUpdated, UpdateContactListDefinition, UpdateContactListInput, UpdateContactListMetadata, UpdateContactListOperation, type UpdateContactListStepConfig, UpdateContactMetadata, UpdateContactOperation, type UpdateContactStepConfig, UpdateSegmentBranch, UpdateSegmentBranchDefect, UpdateSegmentBranchInvalidResponse, UpdateSegmentBranchNotFound, UpdateSegmentBranchProviderRejected, UpdateSegmentBranchUpdated, UpdateSegmentDefinition, UpdateSegmentInput, UpdateSegmentMetadata, UpdateSegmentOperation, type UpdateSegmentStepConfig, newCreateContactListStep, newCreateContactStep, newCreateSegmentStep, newDeleteContactListStep, newDeleteContactStep, newDeleteSegmentStep, newGetActivityStep, newGetContactListStep, newGetContactStep, newGetSegmentStep, newListActivitiesStep, newListContactListsStep, newListContactsStep, newListSegmentsStep, newProjectConnection, newUpdateContactListStep, newUpdateContactStep, newUpdateSegmentStep };