@superdurable/connector-copper 0.0.0-stage → 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,830 @@
1
+ import { SecretString, CredentialProvider, Mutation, Query, ConnectionRef } from '@superdurable/connectors-sdk';
2
+ import { z } from 'zod';
3
+
4
+ /** Connector configuration; omitted fields use manifest defaults. */
5
+ interface Config {
6
+ /** HTTPS Copper Developer API v1 root. Blank uses the displayed default; override only for a compatible private test endpoint. */
7
+ baseUrl?: string;
8
+ /** Maximum duration of one API request as a positive Go duration. Blank uses the displayed default; increase for slow responses. Runtime value in milliseconds. */
9
+ timeoutMs?: number;
10
+ /** Positive maximum complete API response in bytes. Blank uses the displayed default; increase for unusually large CRM responses. Oversized reads select invalidResponse. */
11
+ maxResponseBytes?: number;
12
+ }
13
+ /** Runtime schema for manifest configuration. */
14
+ declare const ConfigSchema: z.ZodObject<{
15
+ baseUrl: z.ZodOptional<z.ZodString>;
16
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
17
+ maxResponseBytes: z.ZodOptional<z.ZodNumber>;
18
+ }, z.core.$strip>;
19
+ /** Private connector credentials resolved by the host. */
20
+ interface Credentials {
21
+ /** Secret API key from https://app.copper.com/ under Settings > Integrations > API Keys. Generate and copy the full token; blank makes calls select defect. Revoke it on that page when retired. */
22
+ apiKey: SecretString;
23
+ /** Email address of the Copper user who generated the API key. Use the generating user's Copper login email; enter a complete address such as user@example.com. Blank makes calls select defect. Stored as a credential and never placed in Flow state. */
24
+ userEmail: SecretString;
25
+ }
26
+ /** Stored credential material that fails the connector credential checks, so no retry can succeed. */
27
+ declare class CredentialMaterialError extends TypeError {
28
+ constructor(message: string);
29
+ }
30
+ /** Report malformed stored credential material, also behind the SDK provider's decoding TypeError. */
31
+ declare function isCredentialMaterialError(error: unknown): boolean;
32
+ /** Decode private credential fields for the connector. */
33
+ declare function decodeCredentials(value: unknown): Credentials;
34
+ /** Host-owned source of private connector credentials. */
35
+ type CredentialSource = CredentialProvider<Credentials>;
36
+ /** CreateCompanyInput supplies the new company's name and unique email domain. */
37
+ interface CreateCompanyInput {
38
+ /** Name is the required display name. */
39
+ "name": string;
40
+ /** EmailDomain is required to check a previous send by a unique provider field. */
41
+ "emailDomain": string;
42
+ }
43
+ /** CompanyMetadata contains the public identity and details of a Copper company. */
44
+ interface CompanyMetadata {
45
+ /** ID is the stable numeric company ID. */
46
+ "id": number;
47
+ /** Name is the company's display name. */
48
+ "name": string;
49
+ /** EmailDomain is the account-unique email domain, when returned. */
50
+ "emailDomain"?: string | undefined;
51
+ /** Details are the optional notes. */
52
+ "details"?: string | undefined;
53
+ }
54
+ /** GetCompanyInput identifies a company by positive numeric ID. */
55
+ interface GetCompanyInput {
56
+ /** CompanyID is a positive decimal Copper company ID. */
57
+ "companyId": string;
58
+ }
59
+ /** ListCompaniesInput selects one Copper search page with optional filters. */
60
+ interface ListCompaniesInput {
61
+ /** PageNumber starts at one; zero uses Copper's first page. */
62
+ "pageNumber"?: number | undefined;
63
+ /** PageSize is 1 through 200; zero uses Copper's default of 20. */
64
+ "pageSize"?: number | undefined;
65
+ /** Name optionally matches a full company name. */
66
+ "name"?: string | undefined;
67
+ /** EmailDomain optionally matches a company's unique email domain. */
68
+ "emailDomain"?: string | undefined;
69
+ }
70
+ /** CompaniesPage contains one returned page of company summaries. */
71
+ interface CompaniesPage {
72
+ /** Companies are the records returned by Copper for this page. */
73
+ "companies": Array<CompanyMetadata> | null;
74
+ }
75
+ /** UpdateCompanyInput changes the named fields of one company. */
76
+ interface UpdateCompanyInput {
77
+ /** CompanyID is a positive numeric ID. */
78
+ "companyId": string;
79
+ /** Name replaces the display name. */
80
+ "name": string;
81
+ /** Details replaces the notes; blank clears them. */
82
+ "details": string;
83
+ }
84
+ /** DeleteCompanyInput identifies the company to remove permanently. */
85
+ interface DeleteCompanyInput {
86
+ /** CompanyID is a positive decimal Copper company ID. */
87
+ "companyId": string;
88
+ }
89
+ /** DeleteCompanyOutput confirms a deleted company ID. */
90
+ interface DeleteCompanyOutput {
91
+ /** ID is the deleted numeric ID. */
92
+ "id": number;
93
+ /** Deleted is true when Copper confirms deletion. */
94
+ "deleted": boolean;
95
+ }
96
+ /** CreatePersonInput supplies the new person's name and work email. */
97
+ interface CreatePersonInput {
98
+ /** Name is the required display name. */
99
+ "name": string;
100
+ /** Email is a required work email used to check a previous send. */
101
+ "email": string;
102
+ }
103
+ /** PersonMetadata contains the public identity and details of a Copper person. */
104
+ interface PersonMetadata {
105
+ /** ID is the stable numeric person ID. */
106
+ "id": number;
107
+ /** Name is the person's display name. */
108
+ "name": string;
109
+ /** Email is the first work email, when returned. */
110
+ "email"?: string | undefined;
111
+ /** Details are the optional notes. */
112
+ "details"?: string | undefined;
113
+ }
114
+ /** GetPersonInput identifies a person by positive numeric ID. */
115
+ interface GetPersonInput {
116
+ /** PersonID is a positive decimal Copper person ID. */
117
+ "personId": string;
118
+ }
119
+ /** ListPeopleInput selects one Copper search page with optional filters. */
120
+ interface ListPeopleInput {
121
+ /** PageNumber starts at one; zero uses Copper's first page. */
122
+ "pageNumber"?: number | undefined;
123
+ /** PageSize is 1 through 200; zero uses Copper's default of 20. */
124
+ "pageSize"?: number | undefined;
125
+ /** Name optionally matches a full person name. */
126
+ "name"?: string | undefined;
127
+ /** Email optionally matches a work email address. */
128
+ "email"?: string | undefined;
129
+ }
130
+ /** PeoplePage contains one returned page of person summaries. */
131
+ interface PeoplePage {
132
+ /** People are the records returned by Copper for this page. */
133
+ "people": Array<PersonMetadata> | null;
134
+ }
135
+ /** UpdatePersonInput changes the named fields of one person. */
136
+ interface UpdatePersonInput {
137
+ /** PersonID is a positive numeric ID. */
138
+ "personId": string;
139
+ /** Name replaces the display name. */
140
+ "name": string;
141
+ /** Details replaces the notes; blank clears them. */
142
+ "details": string;
143
+ }
144
+ /** DeletePersonInput identifies the person to remove permanently. */
145
+ interface DeletePersonInput {
146
+ /** PersonID is a positive decimal Copper person ID. */
147
+ "personId": string;
148
+ }
149
+ /** DeletePersonOutput confirms a deleted person ID. */
150
+ interface DeletePersonOutput {
151
+ /** ID is the deleted numeric ID. */
152
+ "id": number;
153
+ /** Deleted is true when Copper confirms deletion. */
154
+ "deleted": boolean;
155
+ }
156
+ /** ListCustomerSourcesInput requests the sources visible to this Copper user. */
157
+ interface ListCustomerSourcesInput {
158
+ }
159
+ /** CustomerSourceMetadata identifies one configured lead or opportunity source. */
160
+ interface CustomerSourceMetadata {
161
+ /** ID is Copper's stable numeric source identifier. */
162
+ "id": number;
163
+ /** Name is the source label shown in Copper. */
164
+ "name": string;
165
+ }
166
+ /** CustomerSourcesList contains the visible source identifiers and names. */
167
+ interface CustomerSourcesList {
168
+ /** Sources contains only IDs and labels. */
169
+ "sources": Array<CustomerSourceMetadata> | null;
170
+ }
171
+ /** ListLeadStatusesInput selects lead statuses visible to the connected Copper user. */
172
+ interface ListLeadStatusesInput {
173
+ }
174
+ /** LeadStatusMetadata identifies one Copper lead status without private fields. */
175
+ interface LeadStatusMetadata {
176
+ /** ID is the stable Copper status identifier. */
177
+ "id": number;
178
+ /** Name is the status display name. */
179
+ "name": string;
180
+ }
181
+ /** LeadStatusesList contains visible lead status identities. */
182
+ interface LeadStatusesList {
183
+ /** Statuses contains only IDs and names. */
184
+ "statuses": Array<LeadStatusMetadata> | null;
185
+ }
186
+ /** ListUsersInput selects one Copper users page. */
187
+ interface ListUsersInput {
188
+ /** PageNumber starts at one; zero uses Copper's first page. */
189
+ "pageNumber"?: number | undefined;
190
+ /** PageSize is 1 through 200; zero uses Copper's default of 20. */
191
+ "pageSize"?: number | undefined;
192
+ }
193
+ /** UserMetadata contains the public identity and email of one Copper user. */
194
+ interface UserMetadata {
195
+ /** ID is the stable Copper user identifier. */
196
+ "id": number;
197
+ /** Name is the user's display name. */
198
+ "name": string;
199
+ /** Email is the user's account email. */
200
+ "email": string;
201
+ }
202
+ /** UsersPage contains one returned page of user summaries. */
203
+ interface UsersPage {
204
+ /** Users are the records returned by Copper for this page. */
205
+ "users": Array<UserMetadata> | null;
206
+ }
207
+ /** CreateTaskInput supplies the new task's name. */
208
+ interface CreateTaskInput {
209
+ /** Name is the required display name. */
210
+ "name": string;
211
+ }
212
+ /** TaskMetadata contains the public identity and status of one Copper task. */
213
+ interface TaskMetadata {
214
+ /** ID is the stable Copper task identifier. */
215
+ "id": number;
216
+ /** Name is the task display name. */
217
+ "name": string;
218
+ /** Status is the current task status. */
219
+ "status": string;
220
+ }
221
+ /** ListTasksInput selects one Copper search page with optional filters. */
222
+ interface ListTasksInput {
223
+ /** PageNumber starts at one; zero uses Copper's first page. */
224
+ "pageNumber"?: number | undefined;
225
+ /** PageSize is 1 through 200; zero uses Copper's default of 20. */
226
+ "pageSize"?: number | undefined;
227
+ /** Status optionally selects Open or Completed tasks. */
228
+ "status"?: string | undefined;
229
+ }
230
+ /** TasksPage contains one returned page of task summaries. */
231
+ interface TasksPage {
232
+ /** Tasks are the records returned by Copper for this page. */
233
+ "tasks": Array<TaskMetadata> | null;
234
+ }
235
+ /** UpdateTaskInput changes the named fields of one task. */
236
+ interface UpdateTaskInput {
237
+ /** TaskID is a positive numeric ID. */
238
+ "taskId": string;
239
+ /** Name replaces the display name. */
240
+ "name": string;
241
+ /** Details replaces the notes; blank clears them. */
242
+ "details": string;
243
+ }
244
+ /** DeleteTaskInput identifies the task to remove permanently. */
245
+ interface DeleteTaskInput {
246
+ /** TaskID is a positive decimal Copper task ID. */
247
+ "taskId": string;
248
+ }
249
+ /** DeleteTaskOutput confirms a deleted task ID. */
250
+ interface DeleteTaskOutput {
251
+ /** ID is the deleted numeric ID. */
252
+ "id": number;
253
+ /** Deleted is true when Copper confirms deletion. */
254
+ "deleted": boolean;
255
+ }
256
+ /** GetTaskInput identifies one task by Copper ID. */
257
+ interface GetTaskInput {
258
+ /** TaskID is a positive decimal identifier. */
259
+ "taskId": string;
260
+ }
261
+ /** CreateProjectInput supplies the new project's name. */
262
+ interface CreateProjectInput {
263
+ /** Name is the required display name. */
264
+ "name": string;
265
+ }
266
+ /** ProjectMetadata contains the public identity and status of one Copper project. */
267
+ interface ProjectMetadata {
268
+ /** ID is the stable Copper project identifier. */
269
+ "id": number;
270
+ /** Name is the project display name. */
271
+ "name": string;
272
+ /** Status is the current project status. */
273
+ "status": string;
274
+ }
275
+ /** ListProjectsInput selects one Copper search page with optional filters. */
276
+ interface ListProjectsInput {
277
+ /** PageNumber starts at one; zero uses Copper's first page. */
278
+ "pageNumber"?: number | undefined;
279
+ /** PageSize is 1 through 200; zero uses Copper's default of 20. */
280
+ "pageSize"?: number | undefined;
281
+ /** Name optionally matches a full project name. */
282
+ "name"?: string | undefined;
283
+ }
284
+ /** ProjectsPage contains one returned page of project summaries. */
285
+ interface ProjectsPage {
286
+ /** Projects are the records returned by Copper for this page. */
287
+ "projects": Array<ProjectMetadata> | null;
288
+ }
289
+ /** UpdateProjectInput changes the named fields of one project. */
290
+ interface UpdateProjectInput {
291
+ /** ProjectID is a positive numeric ID. */
292
+ "projectId": string;
293
+ /** Name replaces the display name. */
294
+ "name": string;
295
+ /** Details replaces the notes; blank clears them. */
296
+ "details": string;
297
+ }
298
+ /** DeleteProjectInput identifies the project to remove permanently. */
299
+ interface DeleteProjectInput {
300
+ /** ProjectID is a positive decimal Copper project ID. */
301
+ "projectId": string;
302
+ }
303
+ /** DeleteProjectOutput confirms a deleted project ID. */
304
+ interface DeleteProjectOutput {
305
+ /** ID is the deleted numeric ID. */
306
+ "id": number;
307
+ /** Deleted is true when Copper confirms deletion. */
308
+ "deleted": boolean;
309
+ }
310
+ /** GetProjectInput identifies one project by Copper ID. */
311
+ interface GetProjectInput {
312
+ /** ProjectID is a positive decimal identifier. */
313
+ "projectId": string;
314
+ }
315
+ /** CreateOpportunityInput supplies the new opportunity's name. */
316
+ interface CreateOpportunityInput {
317
+ /** Name is the required display name. */
318
+ "name": string;
319
+ }
320
+ /** OpportunityMetadata contains the public identity and status of one Copper opportunity. */
321
+ interface OpportunityMetadata {
322
+ /** ID is the stable Copper opportunity identifier. */
323
+ "id": number;
324
+ /** Name is the opportunity display name. */
325
+ "name": string;
326
+ /** Status is the current opportunity status. */
327
+ "status": string;
328
+ }
329
+ /** ListOpportunitiesInput selects one Copper search page with optional filters. */
330
+ interface ListOpportunitiesInput {
331
+ /** PageNumber starts at one; zero uses Copper's first page. */
332
+ "pageNumber"?: number | undefined;
333
+ /** PageSize is 1 through 200; zero uses Copper's default of 20. */
334
+ "pageSize"?: number | undefined;
335
+ /** Name optionally matches a full opportunity name. */
336
+ "name"?: string | undefined;
337
+ }
338
+ /** OpportunitiesPage contains one returned page of opportunity summaries. */
339
+ interface OpportunitiesPage {
340
+ /** Opportunities are the records returned by Copper for this page. */
341
+ "opportunities": Array<OpportunityMetadata> | null;
342
+ }
343
+ /** UpdateOpportunityInput changes the named fields of one opportunity. */
344
+ interface UpdateOpportunityInput {
345
+ /** OpportunityID is a positive numeric ID. */
346
+ "opportunityId": string;
347
+ /** Name replaces the display name. */
348
+ "name": string;
349
+ /** Details replaces the notes; blank clears them. */
350
+ "details": string;
351
+ }
352
+ /** DeleteOpportunityInput identifies the opportunity to remove permanently. */
353
+ interface DeleteOpportunityInput {
354
+ /** OpportunityID is a positive decimal Copper opportunity ID. */
355
+ "opportunityId": string;
356
+ }
357
+ /** DeleteOpportunityOutput confirms a deleted opportunity ID. */
358
+ interface DeleteOpportunityOutput {
359
+ /** ID is the deleted numeric ID. */
360
+ "id": number;
361
+ /** Deleted is true when Copper confirms deletion. */
362
+ "deleted": boolean;
363
+ }
364
+ /** GetOpportunityInput identifies one opportunity by Copper ID. */
365
+ interface GetOpportunityInput {
366
+ /** OpportunityID is a positive decimal identifier. */
367
+ "opportunityId": string;
368
+ }
369
+ /** CreateLeadInput supplies the new lead's name and email for read-back. */
370
+ interface CreateLeadInput {
371
+ /** Name is the required display name. */
372
+ "name": string;
373
+ /** Email is required to search for a possibly created lead after an unknown outcome. */
374
+ "email": string;
375
+ }
376
+ /** LeadMetadata contains the lead's ID, name, status, and company name. */
377
+ interface LeadMetadata {
378
+ /** ID is the stable Copper lead identifier. */
379
+ "id": number;
380
+ /** Name is the lead display name. */
381
+ "name": string;
382
+ /** Status is the current lead status name. */
383
+ "status": string;
384
+ /** CompanyName is the associated company name when available. */
385
+ "companyName": string;
386
+ }
387
+ /** ListLeadsInput selects one Copper search page with optional filters. */
388
+ interface ListLeadsInput {
389
+ /** PageNumber starts at one; zero uses Copper's first page. */
390
+ "pageNumber"?: number | undefined;
391
+ /** PageSize is 1 through 200; zero uses Copper's default of 20. */
392
+ "pageSize"?: number | undefined;
393
+ /** Name optionally matches a full lead name. */
394
+ "name"?: string | undefined;
395
+ /** Email optionally matches a lead's full email address. */
396
+ "email"?: string | undefined;
397
+ }
398
+ /** LeadsPage contains one returned page of lead summaries. */
399
+ interface LeadsPage {
400
+ /** Leads are the records returned by Copper for this page. */
401
+ "leads": Array<LeadMetadata> | null;
402
+ }
403
+ /** UpdateLeadInput changes the named fields of one lead. */
404
+ interface UpdateLeadInput {
405
+ /** LeadID is a positive numeric ID. */
406
+ "leadId": string;
407
+ /** Name replaces the display name. */
408
+ "name": string;
409
+ /** Details replaces the notes; blank clears them. */
410
+ "details": string;
411
+ }
412
+ /** DeleteLeadInput identifies the lead to remove permanently. */
413
+ interface DeleteLeadInput {
414
+ /** LeadID is a positive decimal Copper lead ID. */
415
+ "leadId": string;
416
+ }
417
+ /** DeleteLeadOutput confirms a deleted lead ID. */
418
+ interface DeleteLeadOutput {
419
+ /** ID is the deleted numeric ID. */
420
+ "id": number;
421
+ /** Deleted is true when Copper confirms deletion. */
422
+ "deleted": boolean;
423
+ }
424
+ /** GetLeadInput selects a Copper lead by its numeric ID. */
425
+ interface GetLeadInput {
426
+ /** LeadID is the numeric ID shown on a Copper lead and returned by its API. */
427
+ "leadId": string;
428
+ }
429
+ /** Runtime validator for CreateCompanyInput. */
430
+ declare const CreateCompanyInputSchema: z.ZodObject<{
431
+ name: z.ZodString;
432
+ emailDomain: z.ZodString;
433
+ }, z.core.$strict>;
434
+ /** Runtime validator for CompanyMetadata. */
435
+ declare const CompanyMetadataSchema: z.ZodObject<{
436
+ id: z.ZodNumber;
437
+ name: z.ZodString;
438
+ emailDomain: z.ZodOptional<z.ZodString>;
439
+ details: z.ZodOptional<z.ZodString>;
440
+ }, z.core.$strict>;
441
+ /** Runtime validator for GetCompanyInput. */
442
+ declare const GetCompanyInputSchema: z.ZodObject<{
443
+ companyId: z.ZodString;
444
+ }, z.core.$strict>;
445
+ /** Runtime validator for ListCompaniesInput. */
446
+ declare const ListCompaniesInputSchema: z.ZodObject<{
447
+ pageNumber: z.ZodOptional<z.ZodNumber>;
448
+ pageSize: z.ZodOptional<z.ZodNumber>;
449
+ name: z.ZodOptional<z.ZodString>;
450
+ emailDomain: z.ZodOptional<z.ZodString>;
451
+ }, z.core.$strict>;
452
+ /** Runtime validator for CompaniesPage. */
453
+ declare const CompaniesPageSchema: z.ZodObject<{
454
+ companies: z.ZodNullable<z.ZodArray<z.ZodObject<{
455
+ id: z.ZodNumber;
456
+ name: z.ZodString;
457
+ emailDomain: z.ZodOptional<z.ZodString>;
458
+ details: z.ZodOptional<z.ZodString>;
459
+ }, z.core.$strict>>>;
460
+ }, z.core.$strict>;
461
+ /** Runtime validator for UpdateCompanyInput. */
462
+ declare const UpdateCompanyInputSchema: z.ZodObject<{
463
+ companyId: z.ZodString;
464
+ name: z.ZodString;
465
+ details: z.ZodString;
466
+ }, z.core.$strict>;
467
+ /** Runtime validator for DeleteCompanyInput. */
468
+ declare const DeleteCompanyInputSchema: z.ZodObject<{
469
+ companyId: z.ZodString;
470
+ }, z.core.$strict>;
471
+ /** Runtime validator for DeleteCompanyOutput. */
472
+ declare const DeleteCompanyOutputSchema: z.ZodObject<{
473
+ id: z.ZodNumber;
474
+ deleted: z.ZodBoolean;
475
+ }, z.core.$strict>;
476
+ /** Runtime validator for CreatePersonInput. */
477
+ declare const CreatePersonInputSchema: z.ZodObject<{
478
+ name: z.ZodString;
479
+ email: z.ZodString;
480
+ }, z.core.$strict>;
481
+ /** Runtime validator for PersonMetadata. */
482
+ declare const PersonMetadataSchema: z.ZodObject<{
483
+ id: z.ZodNumber;
484
+ name: z.ZodString;
485
+ email: z.ZodOptional<z.ZodString>;
486
+ details: z.ZodOptional<z.ZodString>;
487
+ }, z.core.$strict>;
488
+ /** Runtime validator for GetPersonInput. */
489
+ declare const GetPersonInputSchema: z.ZodObject<{
490
+ personId: z.ZodString;
491
+ }, z.core.$strict>;
492
+ /** Runtime validator for ListPeopleInput. */
493
+ declare const ListPeopleInputSchema: z.ZodObject<{
494
+ pageNumber: z.ZodOptional<z.ZodNumber>;
495
+ pageSize: z.ZodOptional<z.ZodNumber>;
496
+ name: z.ZodOptional<z.ZodString>;
497
+ email: z.ZodOptional<z.ZodString>;
498
+ }, z.core.$strict>;
499
+ /** Runtime validator for PeoplePage. */
500
+ declare const PeoplePageSchema: z.ZodObject<{
501
+ people: z.ZodNullable<z.ZodArray<z.ZodObject<{
502
+ id: z.ZodNumber;
503
+ name: z.ZodString;
504
+ email: z.ZodOptional<z.ZodString>;
505
+ details: z.ZodOptional<z.ZodString>;
506
+ }, z.core.$strict>>>;
507
+ }, z.core.$strict>;
508
+ /** Runtime validator for UpdatePersonInput. */
509
+ declare const UpdatePersonInputSchema: z.ZodObject<{
510
+ personId: z.ZodString;
511
+ name: z.ZodString;
512
+ details: z.ZodString;
513
+ }, z.core.$strict>;
514
+ /** Runtime validator for DeletePersonInput. */
515
+ declare const DeletePersonInputSchema: z.ZodObject<{
516
+ personId: z.ZodString;
517
+ }, z.core.$strict>;
518
+ /** Runtime validator for DeletePersonOutput. */
519
+ declare const DeletePersonOutputSchema: z.ZodObject<{
520
+ id: z.ZodNumber;
521
+ deleted: z.ZodBoolean;
522
+ }, z.core.$strict>;
523
+ /** Runtime validator for ListCustomerSourcesInput. */
524
+ declare const ListCustomerSourcesInputSchema: z.ZodObject<{}, z.core.$strict>;
525
+ /** Runtime validator for CustomerSourceMetadata. */
526
+ declare const CustomerSourceMetadataSchema: z.ZodObject<{
527
+ id: z.ZodNumber;
528
+ name: z.ZodString;
529
+ }, z.core.$strict>;
530
+ /** Runtime validator for CustomerSourcesList. */
531
+ declare const CustomerSourcesListSchema: z.ZodObject<{
532
+ sources: z.ZodNullable<z.ZodArray<z.ZodObject<{
533
+ id: z.ZodNumber;
534
+ name: z.ZodString;
535
+ }, z.core.$strict>>>;
536
+ }, z.core.$strict>;
537
+ /** Runtime validator for ListLeadStatusesInput. */
538
+ declare const ListLeadStatusesInputSchema: z.ZodObject<{}, z.core.$strict>;
539
+ /** Runtime validator for LeadStatusMetadata. */
540
+ declare const LeadStatusMetadataSchema: z.ZodObject<{
541
+ id: z.ZodNumber;
542
+ name: z.ZodString;
543
+ }, z.core.$strict>;
544
+ /** Runtime validator for LeadStatusesList. */
545
+ declare const LeadStatusesListSchema: z.ZodObject<{
546
+ statuses: z.ZodNullable<z.ZodArray<z.ZodObject<{
547
+ id: z.ZodNumber;
548
+ name: z.ZodString;
549
+ }, z.core.$strict>>>;
550
+ }, z.core.$strict>;
551
+ /** Runtime validator for ListUsersInput. */
552
+ declare const ListUsersInputSchema: z.ZodObject<{
553
+ pageNumber: z.ZodOptional<z.ZodNumber>;
554
+ pageSize: z.ZodOptional<z.ZodNumber>;
555
+ }, z.core.$strict>;
556
+ /** Runtime validator for UserMetadata. */
557
+ declare const UserMetadataSchema: z.ZodObject<{
558
+ id: z.ZodNumber;
559
+ name: z.ZodString;
560
+ email: z.ZodString;
561
+ }, z.core.$strict>;
562
+ /** Runtime validator for UsersPage. */
563
+ declare const UsersPageSchema: z.ZodObject<{
564
+ users: z.ZodNullable<z.ZodArray<z.ZodObject<{
565
+ id: z.ZodNumber;
566
+ name: z.ZodString;
567
+ email: z.ZodString;
568
+ }, z.core.$strict>>>;
569
+ }, z.core.$strict>;
570
+ /** Runtime validator for CreateTaskInput. */
571
+ declare const CreateTaskInputSchema: z.ZodObject<{
572
+ name: z.ZodString;
573
+ }, z.core.$strict>;
574
+ /** Runtime validator for TaskMetadata. */
575
+ declare const TaskMetadataSchema: z.ZodObject<{
576
+ id: z.ZodNumber;
577
+ name: z.ZodString;
578
+ status: z.ZodString;
579
+ }, z.core.$strict>;
580
+ /** Runtime validator for ListTasksInput. */
581
+ declare const ListTasksInputSchema: z.ZodObject<{
582
+ pageNumber: z.ZodOptional<z.ZodNumber>;
583
+ pageSize: z.ZodOptional<z.ZodNumber>;
584
+ status: z.ZodOptional<z.ZodString>;
585
+ }, z.core.$strict>;
586
+ /** Runtime validator for TasksPage. */
587
+ declare const TasksPageSchema: z.ZodObject<{
588
+ tasks: z.ZodNullable<z.ZodArray<z.ZodObject<{
589
+ id: z.ZodNumber;
590
+ name: z.ZodString;
591
+ status: z.ZodString;
592
+ }, z.core.$strict>>>;
593
+ }, z.core.$strict>;
594
+ /** Runtime validator for UpdateTaskInput. */
595
+ declare const UpdateTaskInputSchema: z.ZodObject<{
596
+ taskId: z.ZodString;
597
+ name: z.ZodString;
598
+ details: z.ZodString;
599
+ }, z.core.$strict>;
600
+ /** Runtime validator for DeleteTaskInput. */
601
+ declare const DeleteTaskInputSchema: z.ZodObject<{
602
+ taskId: z.ZodString;
603
+ }, z.core.$strict>;
604
+ /** Runtime validator for DeleteTaskOutput. */
605
+ declare const DeleteTaskOutputSchema: z.ZodObject<{
606
+ id: z.ZodNumber;
607
+ deleted: z.ZodBoolean;
608
+ }, z.core.$strict>;
609
+ /** Runtime validator for GetTaskInput. */
610
+ declare const GetTaskInputSchema: z.ZodObject<{
611
+ taskId: z.ZodString;
612
+ }, z.core.$strict>;
613
+ /** Runtime validator for CreateProjectInput. */
614
+ declare const CreateProjectInputSchema: z.ZodObject<{
615
+ name: z.ZodString;
616
+ }, z.core.$strict>;
617
+ /** Runtime validator for ProjectMetadata. */
618
+ declare const ProjectMetadataSchema: z.ZodObject<{
619
+ id: z.ZodNumber;
620
+ name: z.ZodString;
621
+ status: z.ZodString;
622
+ }, z.core.$strict>;
623
+ /** Runtime validator for ListProjectsInput. */
624
+ declare const ListProjectsInputSchema: z.ZodObject<{
625
+ pageNumber: z.ZodOptional<z.ZodNumber>;
626
+ pageSize: z.ZodOptional<z.ZodNumber>;
627
+ name: z.ZodOptional<z.ZodString>;
628
+ }, z.core.$strict>;
629
+ /** Runtime validator for ProjectsPage. */
630
+ declare const ProjectsPageSchema: z.ZodObject<{
631
+ projects: z.ZodNullable<z.ZodArray<z.ZodObject<{
632
+ id: z.ZodNumber;
633
+ name: z.ZodString;
634
+ status: z.ZodString;
635
+ }, z.core.$strict>>>;
636
+ }, z.core.$strict>;
637
+ /** Runtime validator for UpdateProjectInput. */
638
+ declare const UpdateProjectInputSchema: z.ZodObject<{
639
+ projectId: z.ZodString;
640
+ name: z.ZodString;
641
+ details: z.ZodString;
642
+ }, z.core.$strict>;
643
+ /** Runtime validator for DeleteProjectInput. */
644
+ declare const DeleteProjectInputSchema: z.ZodObject<{
645
+ projectId: z.ZodString;
646
+ }, z.core.$strict>;
647
+ /** Runtime validator for DeleteProjectOutput. */
648
+ declare const DeleteProjectOutputSchema: z.ZodObject<{
649
+ id: z.ZodNumber;
650
+ deleted: z.ZodBoolean;
651
+ }, z.core.$strict>;
652
+ /** Runtime validator for GetProjectInput. */
653
+ declare const GetProjectInputSchema: z.ZodObject<{
654
+ projectId: z.ZodString;
655
+ }, z.core.$strict>;
656
+ /** Runtime validator for CreateOpportunityInput. */
657
+ declare const CreateOpportunityInputSchema: z.ZodObject<{
658
+ name: z.ZodString;
659
+ }, z.core.$strict>;
660
+ /** Runtime validator for OpportunityMetadata. */
661
+ declare const OpportunityMetadataSchema: z.ZodObject<{
662
+ id: z.ZodNumber;
663
+ name: z.ZodString;
664
+ status: z.ZodString;
665
+ }, z.core.$strict>;
666
+ /** Runtime validator for ListOpportunitiesInput. */
667
+ declare const ListOpportunitiesInputSchema: z.ZodObject<{
668
+ pageNumber: z.ZodOptional<z.ZodNumber>;
669
+ pageSize: z.ZodOptional<z.ZodNumber>;
670
+ name: z.ZodOptional<z.ZodString>;
671
+ }, z.core.$strict>;
672
+ /** Runtime validator for OpportunitiesPage. */
673
+ declare const OpportunitiesPageSchema: z.ZodObject<{
674
+ opportunities: z.ZodNullable<z.ZodArray<z.ZodObject<{
675
+ id: z.ZodNumber;
676
+ name: z.ZodString;
677
+ status: z.ZodString;
678
+ }, z.core.$strict>>>;
679
+ }, z.core.$strict>;
680
+ /** Runtime validator for UpdateOpportunityInput. */
681
+ declare const UpdateOpportunityInputSchema: z.ZodObject<{
682
+ opportunityId: z.ZodString;
683
+ name: z.ZodString;
684
+ details: z.ZodString;
685
+ }, z.core.$strict>;
686
+ /** Runtime validator for DeleteOpportunityInput. */
687
+ declare const DeleteOpportunityInputSchema: z.ZodObject<{
688
+ opportunityId: z.ZodString;
689
+ }, z.core.$strict>;
690
+ /** Runtime validator for DeleteOpportunityOutput. */
691
+ declare const DeleteOpportunityOutputSchema: z.ZodObject<{
692
+ id: z.ZodNumber;
693
+ deleted: z.ZodBoolean;
694
+ }, z.core.$strict>;
695
+ /** Runtime validator for GetOpportunityInput. */
696
+ declare const GetOpportunityInputSchema: z.ZodObject<{
697
+ opportunityId: z.ZodString;
698
+ }, z.core.$strict>;
699
+ /** Runtime validator for CreateLeadInput. */
700
+ declare const CreateLeadInputSchema: z.ZodObject<{
701
+ name: z.ZodString;
702
+ email: z.ZodString;
703
+ }, z.core.$strict>;
704
+ /** Runtime validator for LeadMetadata. */
705
+ declare const LeadMetadataSchema: z.ZodObject<{
706
+ id: z.ZodNumber;
707
+ name: z.ZodString;
708
+ status: z.ZodString;
709
+ companyName: z.ZodString;
710
+ }, z.core.$strict>;
711
+ /** Runtime validator for ListLeadsInput. */
712
+ declare const ListLeadsInputSchema: z.ZodObject<{
713
+ pageNumber: z.ZodOptional<z.ZodNumber>;
714
+ pageSize: z.ZodOptional<z.ZodNumber>;
715
+ name: z.ZodOptional<z.ZodString>;
716
+ email: z.ZodOptional<z.ZodString>;
717
+ }, z.core.$strict>;
718
+ /** Runtime validator for LeadsPage. */
719
+ declare const LeadsPageSchema: z.ZodObject<{
720
+ leads: z.ZodNullable<z.ZodArray<z.ZodObject<{
721
+ id: z.ZodNumber;
722
+ name: z.ZodString;
723
+ status: z.ZodString;
724
+ companyName: z.ZodString;
725
+ }, z.core.$strict>>>;
726
+ }, z.core.$strict>;
727
+ /** Runtime validator for UpdateLeadInput. */
728
+ declare const UpdateLeadInputSchema: z.ZodObject<{
729
+ leadId: z.ZodString;
730
+ name: z.ZodString;
731
+ details: z.ZodString;
732
+ }, z.core.$strict>;
733
+ /** Runtime validator for DeleteLeadInput. */
734
+ declare const DeleteLeadInputSchema: z.ZodObject<{
735
+ leadId: z.ZodString;
736
+ }, z.core.$strict>;
737
+ /** Runtime validator for DeleteLeadOutput. */
738
+ declare const DeleteLeadOutputSchema: z.ZodObject<{
739
+ id: z.ZodNumber;
740
+ deleted: z.ZodBoolean;
741
+ }, z.core.$strict>;
742
+ /** Runtime validator for GetLeadInput. */
743
+ declare const GetLeadInputSchema: z.ZodObject<{
744
+ leadId: z.ZodString;
745
+ }, z.core.$strict>;
746
+
747
+ /** Typed operations supplied by a client or mock. */
748
+ interface Operations {
749
+ /** Invoke createCompany through this connection. */
750
+ createCompany(): Mutation<CreateCompanyInput, CompanyMetadata>;
751
+ /** Invoke getCompany through this connection. */
752
+ getCompany(): Query<GetCompanyInput, CompanyMetadata>;
753
+ /** Invoke listCompanies through this connection. */
754
+ listCompanies(): Query<ListCompaniesInput, CompaniesPage>;
755
+ /** Invoke updateCompany through this connection. */
756
+ updateCompany(): Mutation<UpdateCompanyInput, CompanyMetadata>;
757
+ /** Invoke deleteCompany through this connection. */
758
+ deleteCompany(): Mutation<DeleteCompanyInput, DeleteCompanyOutput>;
759
+ /** Invoke createPerson through this connection. */
760
+ createPerson(): Mutation<CreatePersonInput, PersonMetadata>;
761
+ /** Invoke getPerson through this connection. */
762
+ getPerson(): Query<GetPersonInput, PersonMetadata>;
763
+ /** Invoke listPeople through this connection. */
764
+ listPeople(): Query<ListPeopleInput, PeoplePage>;
765
+ /** Invoke updatePerson through this connection. */
766
+ updatePerson(): Mutation<UpdatePersonInput, PersonMetadata>;
767
+ /** Invoke deletePerson through this connection. */
768
+ deletePerson(): Mutation<DeletePersonInput, DeletePersonOutput>;
769
+ /** Invoke listCustomerSources through this connection. */
770
+ listCustomerSources(): Query<ListCustomerSourcesInput, CustomerSourcesList>;
771
+ /** Invoke listLeadStatuses through this connection. */
772
+ listLeadStatuses(): Query<ListLeadStatusesInput, LeadStatusesList>;
773
+ /** Invoke listUsers through this connection. */
774
+ listUsers(): Query<ListUsersInput, UsersPage>;
775
+ /** Invoke createTask through this connection. */
776
+ createTask(): Mutation<CreateTaskInput, TaskMetadata>;
777
+ /** Invoke listTasks through this connection. */
778
+ listTasks(): Query<ListTasksInput, TasksPage>;
779
+ /** Invoke updateTask through this connection. */
780
+ updateTask(): Mutation<UpdateTaskInput, TaskMetadata>;
781
+ /** Invoke deleteTask through this connection. */
782
+ deleteTask(): Mutation<DeleteTaskInput, DeleteTaskOutput>;
783
+ /** Invoke getTask through this connection. */
784
+ getTask(): Query<GetTaskInput, TaskMetadata>;
785
+ /** Invoke createProject through this connection. */
786
+ createProject(): Mutation<CreateProjectInput, ProjectMetadata>;
787
+ /** Invoke listProjects through this connection. */
788
+ listProjects(): Query<ListProjectsInput, ProjectsPage>;
789
+ /** Invoke updateProject through this connection. */
790
+ updateProject(): Mutation<UpdateProjectInput, ProjectMetadata>;
791
+ /** Invoke deleteProject through this connection. */
792
+ deleteProject(): Mutation<DeleteProjectInput, DeleteProjectOutput>;
793
+ /** Invoke getProject through this connection. */
794
+ getProject(): Query<GetProjectInput, ProjectMetadata>;
795
+ /** Invoke createOpportunity through this connection. */
796
+ createOpportunity(): Mutation<CreateOpportunityInput, OpportunityMetadata>;
797
+ /** Invoke listOpportunities through this connection. */
798
+ listOpportunities(): Query<ListOpportunitiesInput, OpportunitiesPage>;
799
+ /** Invoke updateOpportunity through this connection. */
800
+ updateOpportunity(): Mutation<UpdateOpportunityInput, OpportunityMetadata>;
801
+ /** Invoke deleteOpportunity through this connection. */
802
+ deleteOpportunity(): Mutation<DeleteOpportunityInput, DeleteOpportunityOutput>;
803
+ /** Invoke getOpportunity through this connection. */
804
+ getOpportunity(): Query<GetOpportunityInput, OpportunityMetadata>;
805
+ /** Invoke createLead through this connection. */
806
+ createLead(): Mutation<CreateLeadInput, LeadMetadata>;
807
+ /** Invoke listLeads through this connection. */
808
+ listLeads(): Query<ListLeadsInput, LeadsPage>;
809
+ /** Invoke updateLead through this connection. */
810
+ updateLead(): Mutation<UpdateLeadInput, LeadMetadata>;
811
+ /** Invoke deleteLead through this connection. */
812
+ deleteLead(): Mutation<DeleteLeadInput, DeleteLeadOutput>;
813
+ /** Invoke getLead through this connection. */
814
+ getLead(): Query<GetLeadInput, LeadMetadata>;
815
+ }
816
+ /** Named connector connection kept outside Flow state. */
817
+ declare class Connection<BoundOperations = Operations> {
818
+ /** Stable provider and connection name. */
819
+ readonly reference: ConnectionRef;
820
+ /** Bound provider operations. */
821
+ readonly operations: BoundOperations;
822
+ /** Validate a reference and bind operations. */
823
+ constructor(reference: ConnectionRef, operations: BoundOperations);
824
+ }
825
+ /** Bind a client to a named connection. */
826
+ declare function newConnection(client: Operations, reference: ConnectionRef): Connection;
827
+ /** Bind scripted operations to a named connection. */
828
+ declare function newConnectionWithOperations(operations: Operations, reference: ConnectionRef): Connection;
829
+
830
+ export { type UpdateProjectInput as $, type ListCustomerSourcesInput as A, type CustomerSourcesList as B, type CreateCompanyInput as C, type DeleteCompanyInput as D, type ListLeadStatusesInput as E, type LeadStatusesList as F, type GetCompanyInput as G, type ListLeadsInput as H, type LeadsPage as I, type ListOpportunitiesInput as J, type OpportunitiesPage as K, type LeadMetadata as L, type ListPeopleInput as M, type PeoplePage as N, type OpportunityMetadata as O, type PersonMetadata as P, type ListProjectsInput as Q, type ProjectsPage as R, type ListTasksInput as S, type TaskMetadata as T, type TasksPage as U, type ListUsersInput as V, type UsersPage as W, type UpdateCompanyInput as X, type UpdateLeadInput as Y, type UpdateOpportunityInput as Z, type UpdatePersonInput as _, type CompanyMetadata as a, UpdateTaskInputSchema as a$, type UpdateTaskInput as a0, type Operations as a1, type Config as a2, type Credentials as a3, CompaniesPageSchema as a4, CompanyMetadataSchema as a5, ConfigSchema as a6, CreateCompanyInputSchema as a7, CreateLeadInputSchema as a8, CreateOpportunityInputSchema as a9, LeadMetadataSchema as aA, type LeadStatusMetadata as aB, LeadStatusMetadataSchema as aC, LeadStatusesListSchema as aD, LeadsPageSchema as aE, ListCompaniesInputSchema as aF, ListCustomerSourcesInputSchema as aG, ListLeadStatusesInputSchema as aH, ListLeadsInputSchema as aI, ListOpportunitiesInputSchema as aJ, ListPeopleInputSchema as aK, ListProjectsInputSchema as aL, ListTasksInputSchema as aM, ListUsersInputSchema as aN, OpportunitiesPageSchema as aO, OpportunityMetadataSchema as aP, PeoplePageSchema as aQ, PersonMetadataSchema as aR, ProjectMetadataSchema as aS, ProjectsPageSchema as aT, TaskMetadataSchema as aU, TasksPageSchema as aV, UpdateCompanyInputSchema as aW, UpdateLeadInputSchema as aX, UpdateOpportunityInputSchema as aY, UpdatePersonInputSchema as aZ, UpdateProjectInputSchema as a_, CreatePersonInputSchema as aa, CreateProjectInputSchema as ab, CreateTaskInputSchema as ac, CredentialMaterialError as ad, type CredentialSource as ae, type CustomerSourceMetadata as af, CustomerSourceMetadataSchema as ag, CustomerSourcesListSchema as ah, DeleteCompanyInputSchema as ai, DeleteCompanyOutputSchema as aj, DeleteLeadInputSchema as ak, DeleteLeadOutputSchema as al, DeleteOpportunityInputSchema as am, DeleteOpportunityOutputSchema as an, DeletePersonInputSchema as ao, DeletePersonOutputSchema as ap, DeleteProjectInputSchema as aq, DeleteProjectOutputSchema as ar, DeleteTaskInputSchema as as, DeleteTaskOutputSchema as at, GetCompanyInputSchema as au, GetLeadInputSchema as av, GetOpportunityInputSchema as aw, GetPersonInputSchema as ax, GetProjectInputSchema as ay, GetTaskInputSchema as az, Connection as b, type UserMetadata as b0, UserMetadataSchema as b1, UsersPageSchema as b2, decodeCredentials as b3, isCredentialMaterialError as b4, newConnection as b5, newConnectionWithOperations as b6, type CreateLeadInput as c, type CreateOpportunityInput as d, type CreatePersonInput as e, type CreateProjectInput as f, type ProjectMetadata as g, type CreateTaskInput as h, type DeleteCompanyOutput as i, type DeleteLeadInput as j, type DeleteLeadOutput as k, type DeleteOpportunityInput as l, type DeleteOpportunityOutput as m, type DeletePersonInput as n, type DeletePersonOutput as o, type DeleteProjectInput as p, type DeleteProjectOutput as q, type DeleteTaskInput as r, type DeleteTaskOutput as s, type GetLeadInput as t, type GetOpportunityInput as u, type GetPersonInput as v, type GetProjectInput as w, type GetTaskInput as x, type ListCompaniesInput as y, type CompaniesPage as z };