@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.
@@ -0,0 +1,515 @@
1
+ import { SecretString, RefreshingCredentialProvider, Query, Mutation, ConnectionRef } from '@superdurable/connectors-sdk';
2
+ import { z } from 'zod';
3
+ import { Codec } from '@superdurable/dex';
4
+
5
+ /** A signed 64-bit JSON integer. Values outside the safe number range retain their decimal token. */
6
+ type SignedInteger = number | Readonly<{
7
+ rawJSON: string;
8
+ }>;
9
+ /** Decode one signed Go integer from a safe number or a native raw JSON number token. */
10
+ declare function decodeSignedInteger(value: unknown): SignedInteger;
11
+ /** Read provider JSON with the original syntax of every numeric token for typed field validation. */
12
+ declare function parseJSONNumberTokens(text: string): unknown;
13
+ /** Decode JSON while retaining exact decimal tokens for integers outside JavaScript's safe range. */
14
+ declare function parseExactIntegerJSON(text: string): unknown;
15
+ /** JSON-wire codec for records with signed integer fields. An optional decoder validates the application type. */
16
+ declare function exactIntegerJSONCodec<T>(decode?: (value: unknown) => T): Codec<T>;
17
+ /** Connector configuration; omitted fields use manifest defaults. */
18
+ interface Config {
19
+ /** Constant Contact V3 API root as an absolute HTTPS URL. Blank uses the displayed public endpoint; override only for a trusted local test gateway. */
20
+ baseUrl?: string;
21
+ /** Maximum duration of one API request as a positive Go duration such as 15s. Blank uses the displayed default; increase for slow responses. Runtime value in milliseconds. */
22
+ timeoutMs?: number;
23
+ /** Maximum complete response in bytes as a positive integer. Blank uses the displayed default; raise only when contact responses are larger than expected. */
24
+ maxResponseBytes?: number;
25
+ }
26
+ /** Runtime schema for manifest configuration. */
27
+ declare const ConfigSchema: z.ZodObject<{
28
+ baseUrl: z.ZodOptional<z.ZodString>;
29
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
30
+ maxResponseBytes: z.ZodOptional<z.ZodNumber>;
31
+ }, z.core.$strip>;
32
+ /** Private connector credentials resolved by the host. */
33
+ interface Credentials {
34
+ /** Secret access token produced by Constant Contact OAuth and refreshed by Dex. Never enter it manually; blank requires authorization. */
35
+ accessToken: SecretString;
36
+ /** Non-secret API Key from https://app.constantcontact.com/pages/dma/portal/ > My Applications > select the V3 API app. Blank prevents authorization and refresh. */
37
+ oauthClientId: string;
38
+ /** Secret Client Secret from the same My Applications page. Copy it into this secret field only; blank prevents authorization and refresh. */
39
+ oauthClientSecret: SecretString;
40
+ /** Secret refresh token produced by Constant Contact OAuth and rotated by Dex. Never enter it manually; blank requires reauthorization. */
41
+ refreshToken: SecretString;
42
+ }
43
+ /** Stored credential material that fails the connector credential checks, so no retry can succeed. */
44
+ declare class CredentialMaterialError extends TypeError {
45
+ constructor(message: string);
46
+ }
47
+ /** Report malformed stored credential material, also behind the SDK provider's decoding TypeError. */
48
+ declare function isCredentialMaterialError(error: unknown): boolean;
49
+ /** Decode private credential fields for the connector. */
50
+ declare function decodeCredentials(value: unknown): Credentials;
51
+ /** Decode shared credential fields for the connector. */
52
+ declare function decodeSharedCredentials(value: unknown): Credentials;
53
+ /** Host-owned source of private connector credentials. */
54
+ type CredentialSource = RefreshingCredentialProvider<Credentials>;
55
+ /** GetSegmentInput identifies a segment by its positive numeric ID. */
56
+ interface GetSegmentInput {
57
+ "segmentId": SignedInteger;
58
+ }
59
+ /** SegmentMetadata holds one segment's identity and selection criteria when available. */
60
+ interface SegmentMetadata {
61
+ /** SegmentID is Constant Contact's positive numeric segment identity. */
62
+ "segmentId": SignedInteger;
63
+ /** Name is unique within the account. */
64
+ "name": string;
65
+ /** SegmentCriteria is a JSON object encoded as one string, absent on list results. */
66
+ "segmentCriteria"?: string | undefined;
67
+ }
68
+ /** ListSegmentsInput requests one page of segments. */
69
+ interface ListSegmentsInput {
70
+ /** Limit is 1 through 1000; zero uses the provider default. */
71
+ "limit"?: number | undefined;
72
+ /** SortBy is date or name; blank uses descending edit date. */
73
+ "sortBy"?: string | undefined;
74
+ /** Cursor is an opaque next token from the preceding page; blank starts again. */
75
+ "cursor"?: string | undefined;
76
+ }
77
+ /** SegmentsPage contains one page and a next token when the provider has more. */
78
+ interface SegmentsPage {
79
+ /** Segments contains the returned segment summaries. */
80
+ "segments": Array<SegmentMetadata> | null;
81
+ /** NextCursor is blank after the final page. */
82
+ "nextCursor"?: string | undefined;
83
+ }
84
+ /** CreateSegmentInput supplies a unique name and full criteria JSON string. */
85
+ interface CreateSegmentInput {
86
+ /** Name is the account-unique segment name. */
87
+ "name": string;
88
+ /** SegmentCriteria is the provider's criteria object encoded as JSON text. */
89
+ "segmentCriteria": string;
90
+ }
91
+ /** UpdateSegmentInput replaces the name and full criteria of one segment. */
92
+ interface UpdateSegmentInput {
93
+ /** SegmentID is the positive numeric identity. */
94
+ "segmentId": SignedInteger;
95
+ /** Name is the account-unique replacement name. */
96
+ "name": string;
97
+ /** SegmentCriteria is the complete replacement criteria JSON text. */
98
+ "segmentCriteria": string;
99
+ }
100
+ /** DeleteSegmentInput identifies the active segment to delete. */
101
+ interface DeleteSegmentInput {
102
+ "segmentId": SignedInteger;
103
+ }
104
+ /** DeleteSegmentOutput identifies the segment removed from the active collection. */
105
+ interface DeleteSegmentOutput {
106
+ "segmentId": SignedInteger;
107
+ }
108
+ /** GetActivityInput identifies a recent bulk activity by its provider UUID. */
109
+ interface GetActivityInput {
110
+ /** ActivityID is returned by a bulk operation and expires after ten days. */
111
+ "activityId": string;
112
+ }
113
+ /** ActivityMetadata holds public progress fields without provider error text. */
114
+ interface ActivityMetadata {
115
+ /** ActivityID is the provider UUID. */
116
+ "activityId": string;
117
+ /** State is the provider's current job state. */
118
+ "state": string;
119
+ /** PercentDone is the provider-reported completion percentage. */
120
+ "percentDone": SignedInteger;
121
+ /** ItemsTotalCount is the number of requested items when known. */
122
+ "itemsTotalCount"?: SignedInteger | undefined;
123
+ /** ItemsCompletedCount is the number of completed items when known. */
124
+ "itemsCompletedCount"?: SignedInteger | undefined;
125
+ }
126
+ /** ListActivitiesInput bounds the retained activity summaries returned to Dex. */
127
+ interface ListActivitiesInput {
128
+ /** MaxItems limits returned summaries to 1 through 1000; zero uses 1000. */
129
+ "maxItems"?: number | undefined;
130
+ }
131
+ /** ActivitiesPage contains recent bulk activity summaries. */
132
+ interface ActivitiesPage {
133
+ /** Activities is the provider's returned collection. */
134
+ "activities": Array<ActivityMetadata> | null;
135
+ }
136
+ /** CreateContactInput records email consent and who supplied a new contact. */
137
+ interface CreateContactInput {
138
+ /** EmailAddress is the unique email address, without a display name. */
139
+ "emailAddress": string;
140
+ /** FirstName is the optional given name, up to 50 characters. */
141
+ "firstName"?: string | undefined;
142
+ /** LastName is the optional family name, up to 50 characters. */
143
+ "lastName"?: string | undefined;
144
+ /** EmailPermission is explicit, implicit, or not_set; use only the permission actually obtained. */
145
+ "emailPermission": string;
146
+ /** CreateSource is Account or Contact, according to who added the contact. */
147
+ "createSource": string;
148
+ }
149
+ /** ContactMetadata contains one contact's identity and optional email permission state. */
150
+ interface ContactMetadata {
151
+ /** ContactID is the V3 contact UUID. */
152
+ "contactId": string;
153
+ /** EmailAddress is absent for a contact with no email channel. */
154
+ "emailAddress"?: string | undefined;
155
+ /** FirstName is the contact's optional given name. */
156
+ "firstName"?: string | undefined;
157
+ /** LastName is the contact's optional family name. */
158
+ "lastName"?: string | undefined;
159
+ /** EmailPermission is Constant Contact's permission_to_send state when an email channel exists. */
160
+ "emailPermission"?: string | undefined;
161
+ }
162
+ /** ListContactsInput selects one page of contacts, optionally by exact email. */
163
+ interface ListContactsInput {
164
+ /** EmailAddress matches an exact email address; blank returns all active contacts. */
165
+ "emailAddress"?: string | undefined;
166
+ /** Limit bounds one page to 1 through 500 contacts; zero uses the provider default. */
167
+ "limit"?: number | undefined;
168
+ /** Cursor is the opaque cursor returned by the preceding page; blank starts a search. */
169
+ "cursor"?: string | undefined;
170
+ }
171
+ /** ContactsPage contains selected contact fields and the next page cursor. */
172
+ interface ContactsPage {
173
+ /** Contacts holds one page of contact summaries. */
174
+ "contacts": Array<ContactMetadata> | null;
175
+ /** NextCursor is blank when there are no more contacts. */
176
+ "nextCursor"?: string | undefined;
177
+ }
178
+ /** UpdateContactInput changes selected core fields without changing email consent. */
179
+ interface UpdateContactInput {
180
+ /** ContactID is the existing V3 contact UUID. */
181
+ "contactId": string;
182
+ /** UpdateSource is Account or Contact, identifying who supplied this update. */
183
+ "updateSource": string;
184
+ /** FirstName changes the given name when non-nil; an empty value clears it. */
185
+ "firstName"?: string | undefined;
186
+ /** LastName changes the family name when non-nil; an empty value clears it. */
187
+ "lastName"?: string | undefined;
188
+ /** JobTitle changes the job title when non-nil; an empty value clears it. */
189
+ "jobTitle"?: string | undefined;
190
+ /** CompanyName changes the company name when non-nil; an empty value clears it. */
191
+ "companyName"?: string | undefined;
192
+ }
193
+ /** DeleteContactInput selects a contact to remove from all lists. */
194
+ interface DeleteContactInput {
195
+ /** ContactID is the non-secret V3 contact UUID. */
196
+ "contactId": string;
197
+ }
198
+ /** DeleteContactOutput identifies the removed contact. */
199
+ interface DeleteContactOutput {
200
+ /** ContactID is the requested V3 contact UUID. */
201
+ "contactId": string;
202
+ }
203
+ /** GetContactInput selects a contact by the UUID in its V3 API resource. */
204
+ interface GetContactInput {
205
+ /** ContactID is a non-secret V3 contact UUID. */
206
+ "contactId": string;
207
+ }
208
+ /** GetContactListInput identifies one contact list. */
209
+ interface GetContactListInput {
210
+ /** ListID is the V3 list UUID. */
211
+ "listId": string;
212
+ }
213
+ /** ContactListMetadata contains the public settings of one contact list. */
214
+ interface ContactListMetadata {
215
+ /** ListID is the V3 list UUID. */
216
+ "listId": string;
217
+ /** Name is the unique list name. */
218
+ "name": string;
219
+ /** Description is the optional list description. */
220
+ "description"?: string | undefined;
221
+ /** Favorite controls whether the provider highlights this list. */
222
+ "favorite": boolean;
223
+ }
224
+ /** ListContactListsInput selects a bounded collection of contact lists. */
225
+ interface ListContactListsInput {
226
+ /** Limit is 1 through 1000; zero uses Constant Contact's default. */
227
+ "limit"?: number | undefined;
228
+ /** Name optionally matches the full list name. */
229
+ "name"?: string | undefined;
230
+ }
231
+ /** ContactListsPage contains the returned contact lists. */
232
+ interface ContactListsPage {
233
+ /** Lists are the returned contact lists. */
234
+ "lists": Array<ContactListMetadata> | null;
235
+ }
236
+ /** CreateContactListInput gives the complete settings for a new list. */
237
+ interface CreateContactListInput {
238
+ /** Name is a unique non-empty list name. */
239
+ "name": string;
240
+ /** Description is optional and at most 255 characters. */
241
+ "description"?: string | undefined;
242
+ /** Favorite highlights the list in Constant Contact. */
243
+ "favorite": boolean;
244
+ }
245
+ /** UpdateContactListInput replaces the settings of an existing list. */
246
+ interface UpdateContactListInput {
247
+ /** ListID is the V3 list UUID. */
248
+ "listId": string;
249
+ /** Name is the new unique list name. */
250
+ "name": string;
251
+ /** Description replaces the existing description; blank clears it. */
252
+ "description": string;
253
+ /** Favorite replaces the current favorite state. */
254
+ "favorite": boolean;
255
+ }
256
+ /** DeleteContactListInput identifies one contact list to remove. */
257
+ interface DeleteContactListInput {
258
+ /** ListID is the V3 list UUID. */
259
+ "listId": string;
260
+ }
261
+ /** DeleteContactListOutput identifies the accepted asynchronous deletion. */
262
+ interface DeleteContactListOutput {
263
+ /** ListID is the requested list UUID. */
264
+ "listId": string;
265
+ /** ActivityID identifies the provider activity to inspect for completion. */
266
+ "activityId": string;
267
+ }
268
+ /** Runtime validator for GetSegmentInput. */
269
+ declare const GetSegmentInputSchema: z.ZodObject<{
270
+ segmentId: z.ZodPipe<z.ZodUnknown, z.ZodTransform<number | Readonly<{
271
+ rawJSON: string;
272
+ }>, unknown>>;
273
+ }, z.core.$strict>;
274
+ /** Runtime validator for SegmentMetadata. */
275
+ declare const SegmentMetadataSchema: z.ZodObject<{
276
+ segmentId: z.ZodPipe<z.ZodUnknown, z.ZodTransform<number | Readonly<{
277
+ rawJSON: string;
278
+ }>, unknown>>;
279
+ name: z.ZodString;
280
+ segmentCriteria: z.ZodOptional<z.ZodString>;
281
+ }, z.core.$strict>;
282
+ /** Runtime validator for ListSegmentsInput. */
283
+ declare const ListSegmentsInputSchema: z.ZodObject<{
284
+ limit: z.ZodOptional<z.ZodNumber>;
285
+ sortBy: z.ZodOptional<z.ZodString>;
286
+ cursor: z.ZodOptional<z.ZodString>;
287
+ }, z.core.$strict>;
288
+ /** Runtime validator for SegmentsPage. */
289
+ declare const SegmentsPageSchema: z.ZodObject<{
290
+ segments: z.ZodNullable<z.ZodArray<z.ZodObject<{
291
+ segmentId: z.ZodPipe<z.ZodUnknown, z.ZodTransform<number | Readonly<{
292
+ rawJSON: string;
293
+ }>, unknown>>;
294
+ name: z.ZodString;
295
+ segmentCriteria: z.ZodOptional<z.ZodString>;
296
+ }, z.core.$strict>>>;
297
+ nextCursor: z.ZodOptional<z.ZodString>;
298
+ }, z.core.$strict>;
299
+ /** Runtime validator for CreateSegmentInput. */
300
+ declare const CreateSegmentInputSchema: z.ZodObject<{
301
+ name: z.ZodString;
302
+ segmentCriteria: z.ZodString;
303
+ }, z.core.$strict>;
304
+ /** Runtime validator for UpdateSegmentInput. */
305
+ declare const UpdateSegmentInputSchema: z.ZodObject<{
306
+ segmentId: z.ZodPipe<z.ZodUnknown, z.ZodTransform<number | Readonly<{
307
+ rawJSON: string;
308
+ }>, unknown>>;
309
+ name: z.ZodString;
310
+ segmentCriteria: z.ZodString;
311
+ }, z.core.$strict>;
312
+ /** Runtime validator for DeleteSegmentInput. */
313
+ declare const DeleteSegmentInputSchema: z.ZodObject<{
314
+ segmentId: z.ZodPipe<z.ZodUnknown, z.ZodTransform<number | Readonly<{
315
+ rawJSON: string;
316
+ }>, unknown>>;
317
+ }, z.core.$strict>;
318
+ /** Runtime validator for DeleteSegmentOutput. */
319
+ declare const DeleteSegmentOutputSchema: z.ZodObject<{
320
+ segmentId: z.ZodPipe<z.ZodUnknown, z.ZodTransform<number | Readonly<{
321
+ rawJSON: string;
322
+ }>, unknown>>;
323
+ }, z.core.$strict>;
324
+ /** Runtime validator for GetActivityInput. */
325
+ declare const GetActivityInputSchema: z.ZodObject<{
326
+ activityId: z.ZodString;
327
+ }, z.core.$strict>;
328
+ /** Runtime validator for ActivityMetadata. */
329
+ declare const ActivityMetadataSchema: z.ZodObject<{
330
+ activityId: z.ZodString;
331
+ state: z.ZodString;
332
+ percentDone: z.ZodPipe<z.ZodUnknown, z.ZodTransform<number | Readonly<{
333
+ rawJSON: string;
334
+ }>, unknown>>;
335
+ itemsTotalCount: z.ZodOptional<z.ZodPipe<z.ZodUnknown, z.ZodTransform<number | Readonly<{
336
+ rawJSON: string;
337
+ }>, unknown>>>;
338
+ itemsCompletedCount: z.ZodOptional<z.ZodPipe<z.ZodUnknown, z.ZodTransform<number | Readonly<{
339
+ rawJSON: string;
340
+ }>, unknown>>>;
341
+ }, z.core.$strict>;
342
+ /** Runtime validator for ListActivitiesInput. */
343
+ declare const ListActivitiesInputSchema: z.ZodObject<{
344
+ maxItems: z.ZodOptional<z.ZodNumber>;
345
+ }, z.core.$strict>;
346
+ /** Runtime validator for ActivitiesPage. */
347
+ declare const ActivitiesPageSchema: z.ZodObject<{
348
+ activities: z.ZodNullable<z.ZodArray<z.ZodObject<{
349
+ activityId: z.ZodString;
350
+ state: z.ZodString;
351
+ percentDone: z.ZodPipe<z.ZodUnknown, z.ZodTransform<number | Readonly<{
352
+ rawJSON: string;
353
+ }>, unknown>>;
354
+ itemsTotalCount: z.ZodOptional<z.ZodPipe<z.ZodUnknown, z.ZodTransform<number | Readonly<{
355
+ rawJSON: string;
356
+ }>, unknown>>>;
357
+ itemsCompletedCount: z.ZodOptional<z.ZodPipe<z.ZodUnknown, z.ZodTransform<number | Readonly<{
358
+ rawJSON: string;
359
+ }>, unknown>>>;
360
+ }, z.core.$strict>>>;
361
+ }, z.core.$strict>;
362
+ /** Runtime validator for CreateContactInput. */
363
+ declare const CreateContactInputSchema: z.ZodObject<{
364
+ emailAddress: z.ZodString;
365
+ firstName: z.ZodOptional<z.ZodString>;
366
+ lastName: z.ZodOptional<z.ZodString>;
367
+ emailPermission: z.ZodString;
368
+ createSource: z.ZodString;
369
+ }, z.core.$strict>;
370
+ /** Runtime validator for ContactMetadata. */
371
+ declare const ContactMetadataSchema: z.ZodObject<{
372
+ contactId: z.ZodString;
373
+ emailAddress: z.ZodOptional<z.ZodString>;
374
+ firstName: z.ZodOptional<z.ZodString>;
375
+ lastName: z.ZodOptional<z.ZodString>;
376
+ emailPermission: z.ZodOptional<z.ZodString>;
377
+ }, z.core.$strict>;
378
+ /** Runtime validator for ListContactsInput. */
379
+ declare const ListContactsInputSchema: z.ZodObject<{
380
+ emailAddress: z.ZodOptional<z.ZodString>;
381
+ limit: z.ZodOptional<z.ZodNumber>;
382
+ cursor: z.ZodOptional<z.ZodString>;
383
+ }, z.core.$strict>;
384
+ /** Runtime validator for ContactsPage. */
385
+ declare const ContactsPageSchema: z.ZodObject<{
386
+ contacts: z.ZodNullable<z.ZodArray<z.ZodObject<{
387
+ contactId: z.ZodString;
388
+ emailAddress: z.ZodOptional<z.ZodString>;
389
+ firstName: z.ZodOptional<z.ZodString>;
390
+ lastName: z.ZodOptional<z.ZodString>;
391
+ emailPermission: z.ZodOptional<z.ZodString>;
392
+ }, z.core.$strict>>>;
393
+ nextCursor: z.ZodOptional<z.ZodString>;
394
+ }, z.core.$strict>;
395
+ /** Runtime validator for UpdateContactInput. */
396
+ declare const UpdateContactInputSchema: z.ZodObject<{
397
+ contactId: z.ZodString;
398
+ updateSource: z.ZodString;
399
+ firstName: z.ZodOptional<z.ZodString>;
400
+ lastName: z.ZodOptional<z.ZodString>;
401
+ jobTitle: z.ZodOptional<z.ZodString>;
402
+ companyName: z.ZodOptional<z.ZodString>;
403
+ }, z.core.$strict>;
404
+ /** Runtime validator for DeleteContactInput. */
405
+ declare const DeleteContactInputSchema: z.ZodObject<{
406
+ contactId: z.ZodString;
407
+ }, z.core.$strict>;
408
+ /** Runtime validator for DeleteContactOutput. */
409
+ declare const DeleteContactOutputSchema: z.ZodObject<{
410
+ contactId: z.ZodString;
411
+ }, z.core.$strict>;
412
+ /** Runtime validator for GetContactInput. */
413
+ declare const GetContactInputSchema: z.ZodObject<{
414
+ contactId: z.ZodString;
415
+ }, z.core.$strict>;
416
+ /** Runtime validator for GetContactListInput. */
417
+ declare const GetContactListInputSchema: z.ZodObject<{
418
+ listId: z.ZodString;
419
+ }, z.core.$strict>;
420
+ /** Runtime validator for ContactListMetadata. */
421
+ declare const ContactListMetadataSchema: z.ZodObject<{
422
+ listId: z.ZodString;
423
+ name: z.ZodString;
424
+ description: z.ZodOptional<z.ZodString>;
425
+ favorite: z.ZodBoolean;
426
+ }, z.core.$strict>;
427
+ /** Runtime validator for ListContactListsInput. */
428
+ declare const ListContactListsInputSchema: z.ZodObject<{
429
+ limit: z.ZodOptional<z.ZodNumber>;
430
+ name: z.ZodOptional<z.ZodString>;
431
+ }, z.core.$strict>;
432
+ /** Runtime validator for ContactListsPage. */
433
+ declare const ContactListsPageSchema: z.ZodObject<{
434
+ lists: z.ZodNullable<z.ZodArray<z.ZodObject<{
435
+ listId: z.ZodString;
436
+ name: z.ZodString;
437
+ description: z.ZodOptional<z.ZodString>;
438
+ favorite: z.ZodBoolean;
439
+ }, z.core.$strict>>>;
440
+ }, z.core.$strict>;
441
+ /** Runtime validator for CreateContactListInput. */
442
+ declare const CreateContactListInputSchema: z.ZodObject<{
443
+ name: z.ZodString;
444
+ description: z.ZodOptional<z.ZodString>;
445
+ favorite: z.ZodBoolean;
446
+ }, z.core.$strict>;
447
+ /** Runtime validator for UpdateContactListInput. */
448
+ declare const UpdateContactListInputSchema: z.ZodObject<{
449
+ listId: z.ZodString;
450
+ name: z.ZodString;
451
+ description: z.ZodString;
452
+ favorite: z.ZodBoolean;
453
+ }, z.core.$strict>;
454
+ /** Runtime validator for DeleteContactListInput. */
455
+ declare const DeleteContactListInputSchema: z.ZodObject<{
456
+ listId: z.ZodString;
457
+ }, z.core.$strict>;
458
+ /** Runtime validator for DeleteContactListOutput. */
459
+ declare const DeleteContactListOutputSchema: z.ZodObject<{
460
+ listId: z.ZodString;
461
+ activityId: z.ZodString;
462
+ }, z.core.$strict>;
463
+
464
+ /** Typed operations supplied by a client or mock. */
465
+ interface Operations {
466
+ /** Invoke getSegment through this connection. */
467
+ getSegment(): Query<GetSegmentInput, SegmentMetadata>;
468
+ /** Invoke listSegments through this connection. */
469
+ listSegments(): Query<ListSegmentsInput, SegmentsPage>;
470
+ /** Invoke createSegment through this connection. */
471
+ createSegment(): Mutation<CreateSegmentInput, SegmentMetadata>;
472
+ /** Invoke updateSegment through this connection. */
473
+ updateSegment(): Mutation<UpdateSegmentInput, SegmentMetadata>;
474
+ /** Invoke deleteSegment through this connection. */
475
+ deleteSegment(): Mutation<DeleteSegmentInput, DeleteSegmentOutput>;
476
+ /** Invoke getActivity through this connection. */
477
+ getActivity(): Query<GetActivityInput, ActivityMetadata>;
478
+ /** Invoke listActivities through this connection. */
479
+ listActivities(): Query<ListActivitiesInput, ActivitiesPage>;
480
+ /** Invoke createContact through this connection. */
481
+ createContact(): Mutation<CreateContactInput, ContactMetadata>;
482
+ /** Invoke listContacts through this connection. */
483
+ listContacts(): Query<ListContactsInput, ContactsPage>;
484
+ /** Invoke updateContact through this connection. */
485
+ updateContact(): Mutation<UpdateContactInput, ContactMetadata>;
486
+ /** Invoke deleteContact through this connection. */
487
+ deleteContact(): Mutation<DeleteContactInput, DeleteContactOutput>;
488
+ /** Invoke getContact through this connection. */
489
+ getContact(): Query<GetContactInput, ContactMetadata>;
490
+ /** Invoke getContactList through this connection. */
491
+ getContactList(): Query<GetContactListInput, ContactListMetadata>;
492
+ /** Invoke listContactLists through this connection. */
493
+ listContactLists(): Query<ListContactListsInput, ContactListsPage>;
494
+ /** Invoke createContactList through this connection. */
495
+ createContactList(): Mutation<CreateContactListInput, ContactListMetadata>;
496
+ /** Invoke updateContactList through this connection. */
497
+ updateContactList(): Mutation<UpdateContactListInput, ContactListMetadata>;
498
+ /** Invoke deleteContactList through this connection. */
499
+ deleteContactList(): Mutation<DeleteContactListInput, DeleteContactListOutput>;
500
+ }
501
+ /** Named connector connection kept outside Flow state. */
502
+ declare class Connection<BoundOperations = Operations> {
503
+ /** Stable provider and connection name. */
504
+ readonly reference: ConnectionRef;
505
+ /** Bound provider operations. */
506
+ readonly operations: BoundOperations;
507
+ /** Validate a reference and bind operations. */
508
+ constructor(reference: ConnectionRef, operations: BoundOperations);
509
+ }
510
+ /** Bind a client to a named connection. */
511
+ declare function newConnection(client: Operations, reference: ConnectionRef): Connection;
512
+ /** Bind scripted operations to a named connection. */
513
+ declare function newConnectionWithOperations(operations: Operations, reference: ConnectionRef): Connection;
514
+
515
+ export { GetSegmentInputSchema as $, type ActivityMetadata as A, ConfigSchema as B, type CreateSegmentInput as C, type DeleteSegmentInput as D, ContactListMetadataSchema as E, ContactListsPageSchema as F, type GetSegmentInput as G, ContactMetadataSchema as H, ContactsPageSchema as I, CreateContactInputSchema as J, CreateContactListInputSchema as K, type ListSegmentsInput as L, CreateSegmentInputSchema as M, CredentialMaterialError as N, type Operations as O, type CredentialSource as P, DeleteContactInputSchema as Q, DeleteContactListInputSchema as R, type SegmentMetadata as S, DeleteContactListOutputSchema as T, type UpdateSegmentInput as U, DeleteContactOutputSchema as V, DeleteSegmentInputSchema as W, DeleteSegmentOutputSchema as X, GetActivityInputSchema as Y, GetContactInputSchema as Z, GetContactListInputSchema as _, type SegmentsPage as a, ListActivitiesInputSchema as a0, ListContactListsInputSchema as a1, ListContactsInputSchema as a2, ListSegmentsInputSchema as a3, SegmentMetadataSchema as a4, SegmentsPageSchema as a5, type SignedInteger as a6, UpdateContactInputSchema as a7, UpdateContactListInputSchema as a8, UpdateSegmentInputSchema as a9, decodeCredentials as aa, decodeSharedCredentials as ab, decodeSignedInteger as ac, exactIntegerJSONCodec as ad, isCredentialMaterialError as ae, newConnection as af, newConnectionWithOperations as ag, parseExactIntegerJSON as ah, parseJSONNumberTokens as ai, type DeleteSegmentOutput as b, type GetActivityInput as c, type ListActivitiesInput as d, type ActivitiesPage as e, type CreateContactInput as f, type ContactMetadata as g, type ListContactsInput as h, type ContactsPage as i, type UpdateContactInput as j, type DeleteContactInput as k, type DeleteContactOutput as l, type GetContactListInput as m, type ContactListMetadata as n, type ListContactListsInput as o, type ContactListsPage as p, type CreateContactListInput as q, type UpdateContactListInput as r, type DeleteContactListInput as s, type DeleteContactListOutput as t, type Config as u, type Credentials as v, type GetContactInput as w, Connection as x, ActivitiesPageSchema as y, ActivityMetadataSchema as z };