@first-to-fly/crm-sdk 1.4.3 → 1.6.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/api.d.cts CHANGED
@@ -1,711 +1,5 @@
1
- /**
2
- * GENERATED from crm-be zod contracts by scripts/gen-sdk-contracts.ts — do not edit by hand.
3
- *
4
- * These types are derived directly from the CRM backend's zod request/response
5
- * schemas so the SDK's typed API client cannot drift from the server. To
6
- * regenerate after a contract change, run `bun run gen:sdk-contracts` in crm-be.
7
- *
8
- * This file is fully self-contained: it has no runtime imports and no dependency
9
- * on crm-be or zod.
10
- */
11
- type ContactCreate = {
12
- name: string;
13
- display_name?: (string | undefined) | null;
14
- email?: (string | undefined) | "";
15
- phone?: (string | "") | undefined;
16
- notes?: (string | undefined) | null;
17
- avatar_url?: (string | undefined) | null;
18
- position?: (string | undefined) | null;
19
- company_name?: (string | undefined) | null;
20
- mobile?: (string | undefined) | null;
21
- city?: (string | undefined) | null;
22
- country?: (string | undefined) | null;
23
- timezone?: (string | undefined) | null;
24
- communication_preference?: (("email" | "phone" | "whatsapp") | undefined) | null;
25
- tags?: (string[] | undefined) | null;
26
- priority?: (("low" | "medium" | "high" | "vip") | undefined) | null;
27
- department?: (string | undefined) | null;
28
- industry?: (string | undefined) | null;
29
- assigned_to?: (string | undefined) | null;
30
- metadata?: {
31
- [x: string]: unknown;
32
- } | undefined;
33
- custom_fields?: ({
34
- [x: string]: unknown;
35
- } | undefined) | null;
36
- };
37
- type ContactUpdate = {
38
- name?: string | undefined;
39
- display_name?: ((string | undefined) | null) | undefined;
40
- email?: ((string | undefined) | "") | undefined;
41
- phone?: ((string | "") | undefined) | undefined;
42
- notes?: ((string | undefined) | null) | undefined;
43
- avatar_url?: ((string | undefined) | null) | undefined;
44
- position?: ((string | undefined) | null) | undefined;
45
- company_name?: ((string | undefined) | null) | undefined;
46
- mobile?: ((string | undefined) | null) | undefined;
47
- city?: ((string | undefined) | null) | undefined;
48
- country?: ((string | undefined) | null) | undefined;
49
- timezone?: ((string | undefined) | null) | undefined;
50
- communication_preference?: ((("email" | "phone" | "whatsapp") | undefined) | null) | undefined;
51
- tags?: ((string[] | undefined) | null) | undefined;
52
- priority?: ((("low" | "medium" | "high" | "vip") | undefined) | null) | undefined;
53
- department?: ((string | undefined) | null) | undefined;
54
- industry?: ((string | undefined) | null) | undefined;
55
- assigned_to?: ((string | undefined) | null) | undefined;
56
- metadata?: ({
57
- [x: string]: unknown;
58
- } | undefined) | undefined;
59
- custom_fields?: (({
60
- [x: string]: unknown;
61
- } | undefined) | null) | undefined;
62
- };
63
- type ContactQuery = {
64
- page?: number;
65
- pageSize?: number;
66
- search?: string | undefined;
67
- name?: string | undefined;
68
- email?: string | undefined;
69
- phone?: string | undefined;
70
- status?: ("active" | "blocked") | undefined;
71
- company_name?: string | undefined;
72
- priority?: ("low" | "medium" | "high" | "vip") | undefined;
73
- department?: string | undefined;
74
- industry?: string | undefined;
75
- communication_preference?: ("email" | "phone" | "whatsapp") | undefined;
76
- assigned_to?: string | undefined;
77
- tags?: string | undefined;
78
- tag_filter?: ("and" | "or");
79
- include_tags?: boolean;
80
- };
81
- type Contact = {
82
- id: string;
83
- name: string;
84
- display_name?: (string | undefined) | null;
85
- email?: string | undefined;
86
- phone?: (string | undefined) | null;
87
- notes?: string | undefined;
88
- status: "active" | "blocked";
89
- assigned_to?: (string | undefined) | null;
90
- assignment: {
91
- assigned_to?: (string | undefined) | null;
92
- assigned_user_name?: (string | undefined) | null;
93
- assigned_user_email?: (string | undefined) | null;
94
- assigned_user_avatar?: (string | undefined) | null;
95
- };
96
- user_id: string;
97
- workspace_id: string;
98
- created_at: string;
99
- updated_at: string;
100
- deleted_at?: (string | undefined) | null;
101
- avatar_url?: (string | undefined) | null;
102
- position?: (string | undefined) | null;
103
- company_name?: (string | undefined) | null;
104
- mobile?: (string | undefined) | null;
105
- city?: (string | undefined) | null;
106
- country?: (string | undefined) | null;
107
- timezone?: (string | undefined) | null;
108
- communication_preference?: (("email" | "phone" | "whatsapp") | undefined) | null;
109
- tags?: (string[] | undefined) | null;
110
- priority?: (("low" | "medium" | "high" | "vip") | undefined) | null;
111
- department?: (string | undefined) | null;
112
- industry?: (string | undefined) | null;
113
- metadata?: {
114
- [x: string]: unknown;
115
- } | undefined;
116
- custom_fields?: ({
117
- [x: string]: unknown;
118
- } | undefined) | null;
119
- tag_objects?: {
120
- [x: string]: unknown;
121
- }[] | undefined;
122
- conversations?: {
123
- id: string;
124
- channel: "whatsapp" | "whatsapp_web" | "messenger" | "instagram" | "email" | "sms" | "webchat";
125
- channel_id?: (string | undefined) | null;
126
- merge_group_id?: (string | undefined) | null;
127
- merged_count?: number | undefined;
128
- }[] | undefined;
129
- email_suppression?: ({
130
- id: string;
131
- reason: "hard_bounce" | "complaint_reply" | "manual";
132
- reason_detail: string | null;
133
- created_at: string;
134
- } | null) | undefined;
135
- };
136
- type ContactList = {
137
- items: {
138
- id: string;
139
- name: string;
140
- display_name?: (string | undefined) | null;
141
- email?: string | undefined;
142
- phone?: (string | undefined) | null;
143
- notes?: string | undefined;
144
- status: "active" | "blocked";
145
- assigned_to?: (string | undefined) | null;
146
- assignment: {
147
- assigned_to?: (string | undefined) | null;
148
- assigned_user_name?: (string | undefined) | null;
149
- assigned_user_email?: (string | undefined) | null;
150
- assigned_user_avatar?: (string | undefined) | null;
151
- };
152
- user_id: string;
153
- workspace_id: string;
154
- created_at: string;
155
- updated_at: string;
156
- deleted_at?: (string | undefined) | null;
157
- avatar_url?: (string | undefined) | null;
158
- position?: (string | undefined) | null;
159
- company_name?: (string | undefined) | null;
160
- mobile?: (string | undefined) | null;
161
- city?: (string | undefined) | null;
162
- country?: (string | undefined) | null;
163
- timezone?: (string | undefined) | null;
164
- communication_preference?: (("email" | "phone" | "whatsapp") | undefined) | null;
165
- tags?: (string[] | undefined) | null;
166
- priority?: (("low" | "medium" | "high" | "vip") | undefined) | null;
167
- department?: (string | undefined) | null;
168
- industry?: (string | undefined) | null;
169
- metadata?: {
170
- [x: string]: unknown;
171
- } | undefined;
172
- custom_fields?: ({
173
- [x: string]: unknown;
174
- } | undefined) | null;
175
- tag_objects?: {
176
- [x: string]: unknown;
177
- }[] | undefined;
178
- conversations?: {
179
- id: string;
180
- channel: "whatsapp" | "whatsapp_web" | "messenger" | "instagram" | "email" | "sms" | "webchat";
181
- channel_id?: (string | undefined) | null;
182
- merge_group_id?: (string | undefined) | null;
183
- merged_count?: number | undefined;
184
- }[] | undefined;
185
- email_suppression?: ({
186
- id: string;
187
- reason: "hard_bounce" | "complaint_reply" | "manual";
188
- reason_detail: string | null;
189
- created_at: string;
190
- } | null) | undefined;
191
- }[];
192
- totalCount: number;
193
- pageCount: number;
194
- currentPage: number;
195
- pageSize: number;
196
- };
197
- type LeadCreate = {
198
- name: string;
199
- email?: ((string | undefined) | null) | "";
200
- phone?: (string | "") | undefined;
201
- avatar_url?: (string | undefined) | null;
202
- status?: string;
203
- assigned_to?: (string | undefined) | null;
204
- company_name?: (string | undefined) | null;
205
- position?: (string | undefined) | null;
206
- industry?: (string | undefined) | null;
207
- department?: (string | undefined) | null;
208
- mobile?: (string | undefined) | null;
209
- city?: (string | undefined) | null;
210
- country?: (string | undefined) | null;
211
- timezone?: (string | undefined) | null;
212
- priority?: (("low" | "medium" | "high" | "vip") | null) | undefined;
213
- communication_preference?: (("email" | "phone" | "whatsapp") | null) | undefined;
214
- tags?: (string[] | undefined) | null;
215
- notes?: (string | undefined) | null;
216
- source?: (string | undefined) | null;
217
- budget?: (number | undefined) | null;
218
- expected_close_date?: (string | undefined) | null;
219
- close_outcome?: (("won" | "lost") | undefined) | null;
220
- close_reason?: (string | undefined) | null;
221
- close_value?: (number | undefined) | null;
222
- channel_id?: (string | undefined) | null;
223
- team_id?: (string | undefined) | null;
224
- assignment_source?: (("manual" | "auto_round_robin" | "auto_regional" | "workflow_automation") | undefined) | null;
225
- source_identifier_type?: (("phone" | "email" | "messenger_user_id" | "instagram_user_id" | "whatsapp_phone" | "whatsapp_lid" | "telegram_user_id") | undefined) | null;
226
- source_identifier_value?: (string | undefined) | null;
227
- has_potential_duplicates?: boolean | undefined;
228
- custom_fields?: ({
229
- [x: string]: unknown;
230
- } | undefined) | null;
231
- };
232
- type LeadUpdate = {
233
- name?: string | undefined;
234
- email?: (((string | undefined) | null) | "") | undefined;
235
- phone?: ((string | "") | undefined) | undefined;
236
- avatar_url?: ((string | undefined) | null) | undefined;
237
- status?: string | undefined;
238
- assigned_to?: ((string | undefined) | null) | undefined;
239
- company_name?: ((string | undefined) | null) | undefined;
240
- position?: ((string | undefined) | null) | undefined;
241
- industry?: ((string | undefined) | null) | undefined;
242
- department?: ((string | undefined) | null) | undefined;
243
- mobile?: ((string | undefined) | null) | undefined;
244
- city?: ((string | undefined) | null) | undefined;
245
- country?: ((string | undefined) | null) | undefined;
246
- timezone?: ((string | undefined) | null) | undefined;
247
- priority?: ((("low" | "medium" | "high" | "vip") | null) | undefined) | undefined;
248
- communication_preference?: ((("email" | "phone" | "whatsapp") | null) | undefined) | undefined;
249
- tags?: ((string[] | undefined) | null) | undefined;
250
- notes?: ((string | undefined) | null) | undefined;
251
- source?: ((string | undefined) | null) | undefined;
252
- budget?: ((number | undefined) | null) | undefined;
253
- expected_close_date?: ((string | undefined) | null) | undefined;
254
- close_outcome?: ((("won" | "lost") | undefined) | null) | undefined;
255
- close_reason?: ((string | undefined) | null) | undefined;
256
- close_value?: ((number | undefined) | null) | undefined;
257
- channel_id?: ((string | undefined) | null) | undefined;
258
- team_id?: ((string | undefined) | null) | undefined;
259
- assignment_source?: ((("manual" | "auto_round_robin" | "auto_regional" | "workflow_automation") | undefined) | null) | undefined;
260
- source_identifier_type?: ((("phone" | "email" | "messenger_user_id" | "instagram_user_id" | "whatsapp_phone" | "whatsapp_lid" | "telegram_user_id") | undefined) | null) | undefined;
261
- source_identifier_value?: ((string | undefined) | null) | undefined;
262
- has_potential_duplicates?: (boolean | undefined) | undefined;
263
- custom_fields?: (({
264
- [x: string]: unknown;
265
- } | undefined) | null) | undefined;
266
- };
267
- type LeadQuery = {
268
- page?: number;
269
- pageSize?: number;
270
- search?: string | undefined;
271
- name?: string | undefined;
272
- email?: string | undefined;
273
- phone?: string | undefined;
274
- assigned_to?: string | undefined;
275
- status?: string | undefined;
276
- company_name?: string | undefined;
277
- industry?: string | undefined;
278
- priority?: ("low" | "medium" | "high" | "vip") | undefined;
279
- source?: string | undefined;
280
- tags?: string | undefined;
281
- tag_filter?: ("and" | "or");
282
- include_tags?: boolean;
283
- include_stage_logs?: boolean;
284
- include_task_summary?: boolean;
285
- team_id?: string | undefined;
286
- task_status?: ("pending" | "due_today" | "overdue" | "completed") | undefined;
287
- };
288
- type Lead = {
289
- id: string;
290
- name: string;
291
- email: string;
292
- phone: string;
293
- channel_id?: (string | undefined) | null;
294
- status: string;
295
- assigned_to?: (string | undefined) | null;
296
- assigned_user_name?: (string | undefined) | null;
297
- assigned_user_email?: (string | undefined) | null;
298
- user_id: string;
299
- company_id: string;
300
- created_at: string;
301
- updated_at: string;
302
- company_name?: (string | undefined) | null;
303
- position?: (string | undefined) | null;
304
- industry?: (string | undefined) | null;
305
- department?: (string | undefined) | null;
306
- mobile?: (string | undefined) | null;
307
- city?: (string | undefined) | null;
308
- country?: (string | undefined) | null;
309
- timezone?: (string | undefined) | null;
310
- priority?: (("low" | "medium" | "high" | "vip") | undefined) | null;
311
- communication_preference?: (("email" | "phone" | "whatsapp") | undefined) | null;
312
- tags?: (string[] | undefined) | null;
313
- notes?: (string | undefined) | null;
314
- source?: (string | undefined) | null;
315
- budget?: (number | undefined) | null;
316
- probability?: (number | undefined) | null;
317
- expected_close_date?: (string | undefined) | null;
318
- recent_stage_logs?: {
319
- id: string;
320
- lead_id: string;
321
- previous_stage: string;
322
- new_stage: string;
323
- changed_by: string;
324
- changed_at: string;
325
- metadata?: {
326
- [x: string]: any;
327
- } | undefined;
328
- changed_by_user?: ({
329
- id: string;
330
- full_name?: (string | null) | undefined;
331
- email?: (string | null) | undefined;
332
- avatar_url?: (string | null) | undefined;
333
- } | null) | undefined;
334
- }[] | undefined;
335
- has_overdue_tasks?: boolean | undefined;
336
- avatar_url?: (string | undefined) | null;
337
- close_outcome?: (("won" | "lost") | undefined) | null;
338
- close_reason?: (string | undefined) | null;
339
- close_value?: (number | undefined) | null;
340
- assignment_source?: (("manual" | "auto_round_robin" | "auto_regional" | "workflow_automation") | undefined) | null;
341
- team_id?: (string | undefined) | null;
342
- };
343
- type LeadNoteCreate = {
344
- body: string;
345
- mentions?: string[];
346
- };
347
- type LeadNote = {
348
- id: string;
349
- lead_id: string;
350
- body: string;
351
- created_by: string;
352
- created_at: string;
353
- updated_at: string;
354
- author: {
355
- id: string;
356
- full_name?: (string | null) | undefined;
357
- email?: (string | null) | undefined;
358
- avatar_url?: (string | null) | undefined;
359
- } | null;
360
- };
361
- type TaskCreate = {
362
- title: string;
363
- description?: (string | undefined) | null;
364
- due_at: string;
365
- assigned_to?: (string | undefined) | null;
366
- };
367
- type TaskUpdate = {
368
- title?: string | undefined;
369
- description?: (string | undefined) | null;
370
- due_at?: string | undefined;
371
- status?: ("pending" | "completed") | undefined;
372
- assigned_to?: (string | undefined) | null;
373
- };
374
- type TaskQuery = {
375
- page?: number;
376
- pageSize?: number;
377
- search?: string | undefined;
378
- status?: ("pending" | "completed") | undefined;
379
- due_filter?: ("today" | "upcoming" | "overdue") | undefined;
380
- assigned_to?: string | undefined;
381
- };
382
- type Task = {
383
- id: string;
384
- lead_id: string;
385
- title: string;
386
- description?: (string | null) | undefined;
387
- due_at: string;
388
- status: "pending" | "completed";
389
- created_by: string;
390
- assigned_to?: (string | null) | undefined;
391
- created_at: string;
392
- updated_at: string;
393
- completed_at?: (string | null) | undefined;
394
- metadata?: {
395
- [x: string]: any;
396
- } | undefined;
397
- created_by_user: {
398
- id: string;
399
- full_name?: (string | null) | undefined;
400
- email?: (string | null) | undefined;
401
- avatar_url?: (string | null) | undefined;
402
- } | null;
403
- assigned_user: {
404
- id: string;
405
- full_name?: (string | null) | undefined;
406
- email?: (string | null) | undefined;
407
- avatar_url?: (string | null) | undefined;
408
- } | null;
409
- is_overdue: boolean;
410
- is_due_today: boolean;
411
- };
412
- type ConversationQuery = {
413
- page?: number;
414
- limit?: number;
415
- pageSize?: number;
416
- search?: string | undefined;
417
- assignment?: (("me" | "unassigned" | "assigned" | "others") | string) | undefined;
418
- status?: string | string[];
419
- channel?: ("whatsapp" | "whatsapp_web" | "messenger" | "instagram" | "email" | "sms" | "webchat" | "website_form") | undefined;
420
- channel_id?: string | string[];
421
- team_id?: string | string[];
422
- tags?: string | undefined;
423
- created_from?: string | undefined;
424
- created_to?: string | undefined;
425
- message_from?: string | undefined;
426
- message_to?: string | undefined;
427
- unread?: boolean | undefined;
428
- needs_human_reply?: boolean | undefined;
429
- exclude_merged?: boolean | undefined;
430
- exclude_email?: boolean | undefined;
431
- exclude_groups?: boolean | undefined;
432
- contact_id?: string | undefined;
433
- lead_stage?: string | undefined;
434
- system_audience_id?: string | undefined;
435
- };
436
- type ConversationUpdate = {
437
- assigned_to?: (string | undefined) | null;
438
- notes?: (string | undefined) | null;
439
- };
440
- type Conversation = {
441
- id: string;
442
- contact: {
443
- id: string;
444
- name: string;
445
- phone: string;
446
- email?: string | undefined;
447
- status: "active" | "blocked";
448
- };
449
- last_message: {
450
- content?: string | undefined;
451
- timestamp?: string | undefined;
452
- direction?: ("inbound" | "outbound") | undefined;
453
- status?: ("sent" | "delivered" | "read" | "failed") | undefined;
454
- };
455
- assignment: {
456
- assigned_to?: string | undefined;
457
- assigned_user_name?: string | undefined;
458
- assigned_user_email?: string | undefined;
459
- };
460
- metadata: {
461
- conversation_status: ("active" | "blocked" | "archived" | "reopened" | "on_hold") | null;
462
- statuses?: ("active" | "blocked" | "archived" | "reopened" | "on_hold")[];
463
- channel: "whatsapp" | "whatsapp_web" | "sms" | "email" | "messenger" | "instagram" | "website_form";
464
- unread_count: number;
465
- total_message_count: number;
466
- is_within_24h_window: boolean;
467
- has_messages: boolean;
468
- is_new_contact: boolean;
469
- conversation_type: "active" | "new" | "archived" | "reopened" | "on_hold";
470
- notes?: string | undefined;
471
- };
472
- channel_info: {
473
- last_inbound_message_at?: string | undefined;
474
- last_inbound_message_at_channels: {
475
- [x: string]: string;
476
- };
477
- channel_windows: {
478
- [x: string]: boolean;
479
- };
480
- };
481
- human_agent_state: {
482
- is_enabled: boolean;
483
- activated_at: string | null;
484
- };
485
- ai_handoff_state: {
486
- needs_human_reply: boolean;
487
- reason: string | null;
488
- since: string | null;
489
- };
490
- timestamps: {
491
- created_at: string;
492
- updated_at: string;
493
- };
494
- recipient_suppressed: boolean;
495
- recipient_suppression?: ({
496
- id: string;
497
- reason: "hard_bounce" | "complaint_reply" | "manual";
498
- reason_detail: string | null;
499
- created_at: string;
500
- } | null) | undefined;
501
- };
502
- type MessageQuery = {
503
- page?: number;
504
- pageSize?: number;
505
- direction?: ("inbound" | "outbound") | undefined;
506
- channel_id?: string | undefined;
507
- status?: ("sent" | "delivered" | "read" | "failed") | undefined;
508
- before?: string | undefined;
509
- after?: string | undefined;
510
- };
511
- type MessageCreate = {
512
- message?: string | undefined;
513
- channel?: ("sms" | "whatsapp" | "whatsapp_web" | "email" | "messenger" | "instagram" | "telegram" | "webchat" | "website_form") | undefined;
514
- channel_id?: string | undefined;
515
- target_conversation_id?: string | undefined;
516
- reply_to_id?: string | undefined;
517
- metadata?: {
518
- [x: string]: any;
519
- } | undefined;
520
- template_id?: string | undefined;
521
- system_template_id?: string | undefined;
522
- template_variables?: {
523
- [x: string]: string;
524
- } | undefined;
525
- language_code?: string;
526
- is_first_message?: boolean | undefined;
527
- subject?: string | undefined;
528
- cc?: string[] | undefined;
529
- bcc?: string[] | undefined;
530
- htmlContent?: string | undefined;
531
- inlineImages?: {
532
- id: string;
533
- fileName: string;
534
- mimeType: string;
535
- }[] | undefined;
536
- tag?: ("HUMAN_AGENT") | undefined;
537
- messaging_type?: ("MESSAGE_TAG") | undefined;
538
- };
539
- type Message = {
540
- id: string;
541
- contact: {
542
- id: string;
543
- name?: string | undefined;
544
- phone?: string | undefined;
545
- avatar?: string | undefined;
546
- };
547
- sender: {
548
- user_id?: string | undefined;
549
- name?: string | undefined;
550
- email?: string | undefined;
551
- avatar?: string | undefined;
552
- };
553
- reply: {
554
- reply_to_id?: string | undefined;
555
- reply_to_message?: string | undefined;
556
- reply_to_sender?: string | undefined;
557
- };
558
- message: string;
559
- direction: "inbound" | "outbound";
560
- channel: "sms" | "whatsapp" | "email" | "messenger" | "instagram" | "website_form";
561
- status: "sent" | "delivered" | "read" | "failed";
562
- type: "text" | "image" | "video" | "audio" | "document" | "sticker" | "contacts" | "reaction" | "activity";
563
- message_sid?: string | undefined;
564
- metadata?: {
565
- [x: string]: any;
566
- } | undefined;
567
- delivered_at?: string | undefined;
568
- sent_at?: string | undefined;
569
- failed_at?: string | undefined;
570
- read_at?: string | undefined;
571
- failure_reason?: {
572
- [x: string]: any;
573
- } | undefined;
574
- created_at: string;
575
- updated_at: string;
576
- reactions?: {
577
- id: string;
578
- message_id: string;
579
- user_id: string;
580
- emoji: string;
581
- metadata?: {
582
- [x: string]: any;
583
- } | undefined;
584
- created_at: string;
585
- user_name?: string | undefined;
586
- user_email?: string | undefined;
587
- }[];
588
- media_files?: {
589
- id: string;
590
- original_filename: string;
591
- file_size: number;
592
- mime_type: string;
593
- collection_name: string;
594
- signed_url: string;
595
- created_at?: any;
596
- }[];
597
- activity?: {
598
- id: string;
599
- entity_type: string;
600
- entity_id: string;
601
- activity_type: string;
602
- actor_id?: string | undefined;
603
- actor?: {
604
- id: string;
605
- full_name?: string | undefined;
606
- email?: string | undefined;
607
- avatar_url?: string | undefined;
608
- } | undefined;
609
- body?: {
610
- [x: string]: any;
611
- } | undefined;
612
- created_at?: string | undefined;
613
- } | undefined;
614
- activity_id?: string | undefined;
615
- };
616
- type ProductCreate = {
617
- name: string;
618
- description?: string | undefined;
619
- price: number;
620
- };
621
- type ProductUpdate = {
622
- name?: string | undefined;
623
- description?: (string | undefined) | undefined;
624
- price?: number | undefined;
625
- };
626
- type ProductQuery = {
627
- page?: string | undefined;
628
- limit?: string | undefined;
629
- search?: string | undefined;
630
- name?: string | undefined;
631
- price_min?: string | undefined;
632
- price_max?: string | undefined;
633
- };
634
- type Product = {
635
- id: string;
636
- name: string;
637
- description?: string | undefined;
638
- price: number;
639
- user_id: string;
640
- company_id: string;
641
- created_at: string;
642
- updated_at: string;
643
- };
644
- type TagCreate = {
645
- name: string;
646
- color?: string;
647
- description?: string | undefined;
648
- entity_type: "contact" | "lead" | "conversation";
649
- };
650
- type TagQuery = {
651
- page?: string | number;
652
- limit?: string | number;
653
- search?: string | undefined;
654
- sort_by?: ("name" | "created_at" | "usage_count") | undefined;
655
- order?: ("asc" | "desc") | undefined;
656
- entity_type?: ("contact" | "lead" | "conversation") | undefined;
657
- };
658
- type Tag = {
659
- id: string;
660
- name: string;
661
- color: string;
662
- description?: (string | undefined) | null;
663
- entity_type: "contact" | "lead" | "conversation";
664
- created_by: string;
665
- updated_by?: (string | undefined) | null;
666
- created_at: string;
667
- updated_at: string;
668
- deleted_at?: (string | undefined) | null;
669
- };
670
- type TagWithUsage = {
671
- id: string;
672
- name: string;
673
- color: string;
674
- description?: (string | undefined) | null;
675
- entity_type: "contact" | "lead" | "conversation";
676
- created_by: string;
677
- updated_by?: (string | undefined) | null;
678
- created_at: string;
679
- updated_at: string;
680
- deleted_at?: (string | undefined) | null;
681
- usage_count: number;
682
- };
683
- type TagList = {
684
- items: {
685
- id: string;
686
- name: string;
687
- color: string;
688
- description?: (string | undefined) | null;
689
- entity_type: "contact" | "lead" | "conversation";
690
- created_by: string;
691
- updated_by?: (string | undefined) | null;
692
- created_at: string;
693
- updated_at: string;
694
- deleted_at?: (string | undefined) | null;
695
- usage_count: number;
696
- }[];
697
- totalCount: number;
698
- pageCount: number;
699
- currentPage: number;
700
- pageSize: number;
701
- };
702
- interface ListEnvelope<T> {
703
- items: T[];
704
- totalCount: number;
705
- pageCount: number;
706
- currentPage: number;
707
- pageSize: number;
708
- }
1
+ import { C as ContactQuery, a as ContactList, b as Contact, c as ContactCreate, d as ContactUpdate, L as LeadQuery, e as ListEnvelope, f as Lead, g as LeadCreate, h as LeadUpdate, T as TaskQuery, i as Task, j as LegacyTaskUpdate, k as LegacyTask, P as ProductQuery, l as Product, m as ProductCreate, n as ProductUpdate, o as ConversationQuery, p as Conversation, q as ConversationUpdate, M as MessageQuery, r as Message, s as MessageCreate, t as TagQuery, u as TagWithUsage, v as TagCreate, w as Tag } from './crm-contracts-iWWbB6Ga.cjs';
2
+ export { x as ContactChanges, y as ContactChangesQuery, z as ContactRefUpsertBody, A as ContactRefUpsertResult, B as LeadCapture, D as LeadNote, E as LeadNoteCreate, F as PartnerContactEraseResult, G as PartnerWorkspaceCreated, H as PartnerWorkspaceDetail, I as PartnerWorkspaceExisting, J as PartnerWorkspacePatchBody, K as PartnerWorkspaceSecret, N as PartnerWorkspaceStatus, O as PartnerWorkspaceUpsertBody, Q as TagList } from './crm-contracts-iWWbB6Ga.cjs';
709
3
 
710
4
  /**
711
5
  * Typed CRM REST API client for SaaS backends.
@@ -811,8 +105,8 @@ interface CrmApiClient {
811
105
  };
812
106
  tasks: {
813
107
  list(query?: TaskQuery): Promise<ListEnvelope<Task>>;
814
- create(leadId: string, body: TaskCreate): Promise<Task>;
815
- update(leadId: string, taskId: string, body: TaskUpdate): Promise<Task>;
108
+ /** @deprecated Updates only existing legacy Lead Tasks. Update Activity tasks through `/activities/:id`. */
109
+ update(leadId: string, taskId: string, body: LegacyTaskUpdate): Promise<LegacyTask>;
816
110
  };
817
111
  products: {
818
112
  list(query?: ProductQuery): Promise<ListEnvelope<Product>>;
@@ -839,4 +133,4 @@ interface CrmApiClient {
839
133
  }
840
134
  declare function createCrmApiClient(opts: CrmApiClientOptions): CrmApiClient;
841
135
 
842
- export { type Contact, type ContactCreate, type ContactList, type ContactQuery, type ContactUpdate, type Conversation, type ConversationQuery, type ConversationUpdate, type CrmApiClient, type CrmApiClientOptions, CrmApiError, type Lead, type LeadCreate, type LeadNote, type LeadNoteCreate, type LeadQuery, type LeadUpdate, type ListEnvelope, type Message, type MessageCreate, type MessageQuery, type Product, type ProductCreate, type ProductQuery, type ProductUpdate, type Tag, type TagCreate, type TagList, type TagQuery, type TagWithUsage, type Task, type TaskCreate, type TaskQuery, type TaskUpdate, createCrmApiClient, createCrmApiClient as default };
136
+ export { Contact, ContactCreate, ContactList, ContactQuery, ContactUpdate, Conversation, ConversationQuery, ConversationUpdate, type CrmApiClient, type CrmApiClientOptions, CrmApiError, Lead, LeadCreate, LeadQuery, LeadUpdate, LegacyTask, LegacyTaskUpdate, ListEnvelope, Message, MessageCreate, MessageQuery, Product, ProductCreate, ProductQuery, ProductUpdate, Tag, TagCreate, TagQuery, TagWithUsage, Task, TaskQuery, createCrmApiClient, createCrmApiClient as default };