@gpt-platform/admin 0.11.1 → 0.11.2

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.
@@ -36,6 +36,397 @@ export type UpdateCrmContactAttributes = {
36
36
  portal_user_id?: string;
37
37
  [key: string]: unknown;
38
38
  };
39
+ /** Attributes accepted when creating a CRM address. */
40
+ export type CreateCrmAddressAttributes = {
41
+ workspace_id: string;
42
+ entity_type: "contact" | "company";
43
+ entity_id: string;
44
+ label?: "home" | "work" | "billing" | "shipping" | "headquarters" | "branch" | "other";
45
+ is_primary?: boolean;
46
+ line1?: string;
47
+ line2?: string;
48
+ city?: string;
49
+ state?: string;
50
+ postal_code?: string;
51
+ country?: string;
52
+ latitude?: number;
53
+ longitude?: number;
54
+ };
55
+ /** Attributes accepted when updating a CRM address. */
56
+ export type UpdateCrmAddressAttributes = {
57
+ label?: "home" | "work" | "billing" | "shipping" | "headquarters" | "branch" | "other";
58
+ is_primary?: boolean;
59
+ line1?: string;
60
+ line2?: string;
61
+ city?: string;
62
+ state?: string;
63
+ postal_code?: string;
64
+ country?: string;
65
+ latitude?: number;
66
+ longitude?: number;
67
+ };
68
+ /** Attributes accepted when creating a CRM phone number. */
69
+ export type CreateCrmPhoneNumberAttributes = {
70
+ workspace_id: string;
71
+ entity_type: "contact" | "company";
72
+ entity_id: string;
73
+ number: string;
74
+ label?: "mobile" | "work" | "home" | "fax" | "main" | "other";
75
+ is_primary?: boolean;
76
+ country_code?: string;
77
+ extension?: string;
78
+ };
79
+ /** Attributes accepted when updating a CRM phone number. */
80
+ export type UpdateCrmPhoneNumberAttributes = {
81
+ number?: string;
82
+ label?: "mobile" | "work" | "home" | "fax" | "main" | "other";
83
+ is_primary?: boolean;
84
+ country_code?: string;
85
+ extension?: string;
86
+ };
87
+ /** Attributes accepted when creating a CRM email address. */
88
+ export type CreateCrmEmailAddressAttributes = {
89
+ workspace_id: string;
90
+ entity_type: "contact" | "company";
91
+ entity_id: string;
92
+ email: string;
93
+ label?: "work" | "personal" | "billing" | "support" | "other";
94
+ is_primary?: boolean;
95
+ is_verified?: boolean;
96
+ };
97
+ /** Attributes accepted when updating a CRM email address. */
98
+ export type UpdateCrmEmailAddressAttributes = {
99
+ email?: string;
100
+ label?: "work" | "personal" | "billing" | "support" | "other";
101
+ is_primary?: boolean;
102
+ is_verified?: boolean;
103
+ };
104
+ /** Attributes accepted when creating a CRM social profile. */
105
+ export type CreateCrmSocialProfileAttributes = {
106
+ workspace_id: string;
107
+ entity_type: "contact" | "company";
108
+ entity_id: string;
109
+ platform: "linkedin" | "twitter" | "facebook" | "instagram" | "github" | "youtube" | "tiktok" | "other";
110
+ handle?: string;
111
+ url?: string;
112
+ };
113
+ /** Attributes accepted when updating a CRM social profile. */
114
+ export type UpdateCrmSocialProfileAttributes = {
115
+ handle?: string;
116
+ url?: string;
117
+ };
118
+ /** Attributes accepted when creating a CRM website. */
119
+ export type CreateCrmWebsiteAttributes = {
120
+ workspace_id: string;
121
+ entity_type: "contact" | "company";
122
+ entity_id: string;
123
+ url: string;
124
+ label?: "main" | "careers" | "blog" | "docs" | "portfolio" | "other";
125
+ is_primary?: boolean;
126
+ };
127
+ /** Attributes accepted when updating a CRM website. */
128
+ export type UpdateCrmWebsiteAttributes = {
129
+ url?: string;
130
+ label?: "main" | "careers" | "blog" | "docs" | "portfolio" | "other";
131
+ is_primary?: boolean;
132
+ };
133
+ /** Attributes accepted when creating a CRM company. */
134
+ export type CreateCrmCompanyAttributes = {
135
+ workspace_id: string;
136
+ name: string;
137
+ domain?: string;
138
+ industry?: string;
139
+ description?: string;
140
+ type?: "public" | "private" | "nonprofit" | "government" | "partnership" | "other";
141
+ founded_date?: string;
142
+ tax_id?: string;
143
+ [key: string]: unknown;
144
+ };
145
+ /** Attributes accepted when updating a CRM company (PATCH semantics). */
146
+ export type UpdateCrmCompanyAttributes = {
147
+ name?: string;
148
+ domain?: string;
149
+ industry?: string;
150
+ employee_count?: number;
151
+ description?: string;
152
+ type?: "public" | "private" | "nonprofit" | "government" | "partnership" | "other";
153
+ founded_date?: string;
154
+ tax_id?: string;
155
+ [key: string]: unknown;
156
+ };
157
+ /** Attributes accepted when creating a CRM deal. */
158
+ export type CreateCrmDealAttributes = {
159
+ workspace_id: string;
160
+ name: string;
161
+ amount?: number;
162
+ currency?: string;
163
+ close_date?: string;
164
+ probability?: number;
165
+ source?: string;
166
+ status?: string;
167
+ lost_reason?: string;
168
+ properties?: Record<string, unknown>;
169
+ owner_id?: string;
170
+ pipeline_id?: string;
171
+ pipeline_stage_id?: string;
172
+ company_id?: string;
173
+ application_id?: string;
174
+ [key: string]: unknown;
175
+ };
176
+ /** Attributes accepted when updating a CRM deal (PATCH semantics). */
177
+ export type UpdateCrmDealAttributes = {
178
+ name?: string;
179
+ amount?: number;
180
+ currency?: string;
181
+ close_date?: string;
182
+ probability?: number;
183
+ status?: string;
184
+ lost_reason?: string;
185
+ properties?: Record<string, unknown>;
186
+ owner_id?: string;
187
+ pipeline_id?: string;
188
+ pipeline_stage_id?: string;
189
+ company_id?: string;
190
+ ai_risk_score?: number;
191
+ ai_forecast_category?: string;
192
+ ai_next_action?: string;
193
+ [key: string]: unknown;
194
+ };
195
+ /** Attributes accepted when moving a deal to a different pipeline stage. */
196
+ export type MoveDealStageAttributes = {
197
+ stage_id: string;
198
+ };
199
+ /** Attributes accepted when creating a CRM activity. */
200
+ export type CreateCrmActivityAttributes = {
201
+ workspace_id: string;
202
+ type: string;
203
+ subject?: string;
204
+ body?: string;
205
+ occurred_at?: string;
206
+ duration_seconds?: number;
207
+ direction?: string;
208
+ source?: string;
209
+ source_ref?: string;
210
+ sentiment?: string;
211
+ properties?: Record<string, unknown>;
212
+ content_hash?: string;
213
+ ai_summary?: string;
214
+ application_id?: string;
215
+ [key: string]: unknown;
216
+ };
217
+ /** Attributes accepted when updating a CRM activity (PATCH semantics). */
218
+ export type UpdateCrmActivityAttributes = {
219
+ subject?: string;
220
+ body?: string;
221
+ sentiment?: string;
222
+ properties?: Record<string, unknown>;
223
+ ai_summary?: string;
224
+ ai_action_items?: string[];
225
+ [key: string]: unknown;
226
+ };
227
+ /** Attributes accepted when creating a CRM pipeline. */
228
+ export type CreateCrmPipelineAttributes = {
229
+ workspace_id: string;
230
+ name: string;
231
+ [key: string]: unknown;
232
+ };
233
+ /** Attributes accepted when updating a CRM pipeline (PATCH semantics). */
234
+ export type UpdateCrmPipelineAttributes = {
235
+ name?: string;
236
+ [key: string]: unknown;
237
+ };
238
+ /** Attributes accepted when creating a pipeline stage. */
239
+ export type CreateCrmPipelineStageAttributes = {
240
+ pipeline_id: string;
241
+ name: string;
242
+ order?: number;
243
+ [key: string]: unknown;
244
+ };
245
+ /** Attributes accepted when updating a pipeline stage (PATCH semantics). */
246
+ export type UpdateCrmPipelineStageAttributes = {
247
+ name?: string;
248
+ order?: number;
249
+ [key: string]: unknown;
250
+ };
251
+ /** Attributes accepted when creating a relationship. */
252
+ export type CreateCrmRelationshipAttributes = {
253
+ relationship_type_id: string;
254
+ from_entity_type: string;
255
+ from_entity_id: string;
256
+ to_entity_type: string;
257
+ to_entity_id: string;
258
+ [key: string]: unknown;
259
+ };
260
+ /** Attributes accepted when creating a relationship type. */
261
+ export type CreateCrmRelationshipTypeAttributes = {
262
+ label: string;
263
+ inverse_label?: string;
264
+ from_entity_type: string;
265
+ to_entity_type: string;
266
+ [key: string]: unknown;
267
+ };
268
+ /** Attributes accepted when updating a relationship type (PATCH semantics). */
269
+ export type UpdateCrmRelationshipTypeAttributes = {
270
+ label?: string;
271
+ inverse_label?: string;
272
+ [key: string]: unknown;
273
+ };
274
+ /** Attributes accepted when creating a custom entity. */
275
+ export type CreateCrmCustomEntityAttributes = {
276
+ workspace_id: string;
277
+ entity_type: string;
278
+ properties?: Record<string, unknown>;
279
+ [key: string]: unknown;
280
+ };
281
+ /** Attributes accepted when updating a custom entity (PATCH semantics). */
282
+ export type UpdateCrmCustomEntityAttributes = {
283
+ properties?: Record<string, unknown>;
284
+ [key: string]: unknown;
285
+ };
286
+ /** Attributes accepted when creating a deal product. */
287
+ export type CreateCrmDealProductAttributes = {
288
+ deal_id: string;
289
+ product_id: string;
290
+ workspace_id: string;
291
+ quantity?: number;
292
+ unit_price?: number;
293
+ properties?: Record<string, unknown>;
294
+ };
295
+ /** Attributes accepted when creating a data export job. */
296
+ export type CreateCrmDataExportAttributes = {
297
+ workspace_id: string;
298
+ entity_type: "contact" | "custom_entity" | "activity";
299
+ entity_subtype?: string;
300
+ format: "json" | "csv";
301
+ include?: string[];
302
+ filters?: Array<{
303
+ field: string;
304
+ op: string;
305
+ value?: unknown;
306
+ }>;
307
+ };
308
+ /** Attributes accepted when creating a custom entity type. */
309
+ export type CreateCrmCustomEntityTypeAttributes = {
310
+ application_id: string;
311
+ name: string;
312
+ slug: string;
313
+ icon?: string;
314
+ field_definitions?: Record<string, unknown>[];
315
+ relationships_config?: Record<string, unknown>;
316
+ pipelineable?: boolean;
317
+ searchable?: boolean;
318
+ include_alias?: string;
319
+ };
320
+ /** Attributes accepted when updating a custom entity type (PATCH semantics). */
321
+ export type UpdateCrmCustomEntityTypeAttributes = {
322
+ name?: string;
323
+ icon?: string;
324
+ field_definitions?: Record<string, unknown>[];
325
+ relationships_config?: Record<string, unknown>;
326
+ pipelineable?: boolean;
327
+ searchable?: boolean;
328
+ include_alias?: string;
329
+ };
330
+ /** Attributes accepted when creating a custom field definition. */
331
+ export type CreateCrmCustomFieldDefinitionAttributes = {
332
+ application_id: string;
333
+ entity_type: string;
334
+ name: string;
335
+ label?: string;
336
+ field_type: string;
337
+ required?: boolean;
338
+ default_value?: unknown;
339
+ options?: unknown[];
340
+ validation_rules?: Record<string, unknown>;
341
+ searchable?: boolean;
342
+ filterable?: boolean;
343
+ sort_order?: number;
344
+ };
345
+ /** Attributes accepted when updating a custom field definition (PATCH semantics). */
346
+ export type UpdateCrmCustomFieldDefinitionAttributes = {
347
+ label?: string;
348
+ required?: boolean;
349
+ default_value?: unknown;
350
+ options?: unknown[];
351
+ validation_rules?: Record<string, unknown>;
352
+ searchable?: boolean;
353
+ filterable?: boolean;
354
+ sort_order?: number;
355
+ };
356
+ /** Attributes accepted when creating a channel capture config. */
357
+ export type CreateCrmChannelCaptureConfigAttributes = {
358
+ workspace_id: string;
359
+ application_id: string;
360
+ enabled?: boolean;
361
+ channel_types?: string[];
362
+ auto_create_contacts?: boolean;
363
+ pii_scan_enabled?: boolean;
364
+ content_retention_days?: number;
365
+ };
366
+ /** Attributes accepted when updating a channel capture config (PATCH semantics). */
367
+ export type UpdateCrmChannelCaptureConfigAttributes = {
368
+ enabled?: boolean;
369
+ channel_types?: string[];
370
+ auto_create_contacts?: boolean;
371
+ pii_scan_enabled?: boolean;
372
+ content_retention_days?: number;
373
+ };
374
+ /** Attributes accepted when creating a sync config. */
375
+ export type CreateCrmSyncConfigAttributes = {
376
+ workspace_id: string;
377
+ application_id: string;
378
+ connector_instance_id: string;
379
+ enabled?: boolean;
380
+ auto_create_contacts?: boolean;
381
+ pii_scan_enabled?: boolean;
382
+ entity_type_filters?: string[];
383
+ };
384
+ /** Attributes accepted when updating a sync config (PATCH semantics). */
385
+ export type UpdateCrmSyncConfigAttributes = {
386
+ enabled?: boolean;
387
+ auto_create_contacts?: boolean;
388
+ pii_scan_enabled?: boolean;
389
+ entity_type_filters?: string[];
390
+ };
391
+ /** Parameters for finding paths between two CRM entities via the relationship graph. */
392
+ export type CrmGraphPathsParams = {
393
+ from_type: string;
394
+ from_id: string;
395
+ to_type: string;
396
+ to_id: string;
397
+ max_hops?: number;
398
+ relationship_types?: string;
399
+ fresh?: boolean;
400
+ };
401
+ /** Parameters for getting entities related to a given entity within N hops. */
402
+ export type CrmGraphRelatedParams = {
403
+ entity_type: string;
404
+ entity_id: string;
405
+ max_depth?: number;
406
+ relationship_types?: string;
407
+ fresh?: boolean;
408
+ };
409
+ /** Parameters for computing relationship strength between two entities. */
410
+ export type CrmGraphStrengthParams = {
411
+ from_type: string;
412
+ from_id: string;
413
+ to_type: string;
414
+ to_id: string;
415
+ fresh?: boolean;
416
+ };
417
+ /** Parameters for merging two CRM entities (contacts or companies). */
418
+ export type CrmMergeParams = {
419
+ workspace_id: string;
420
+ primary_id: string;
421
+ secondary_id: string;
422
+ };
423
+ /** Parameters for hybrid CRM search. */
424
+ export type CrmSearchParams = {
425
+ workspace_id: string;
426
+ q: string;
427
+ types?: string;
428
+ mode?: "hybrid" | "lexical" | "semantic";
429
+ };
39
430
  /**
40
431
  * CRM management namespace — contacts, companies, deals, pipelines, and ISV configuration.
41
432
  *
@@ -57,7 +448,7 @@ export declare function createCrmNamespace(rb: RequestBuilder): {
57
448
  /** Archive a contact. */
58
449
  archive: (id: string, options?: RequestOptions) => Promise<unknown>;
59
450
  /** Unarchive a contact. */
60
- unarchive: (id: string, options?: RequestOptions) => Promise<unknown>;
451
+ unarchive: (id: string, workspaceId: string, options?: RequestOptions) => Promise<unknown>;
61
452
  /** Delete a contact. */
62
453
  delete: (id: string, options?: RequestOptions) => Promise<unknown>;
63
454
  companies: {
@@ -66,9 +457,9 @@ export declare function createCrmNamespace(rb: RequestBuilder): {
66
457
  /** List companies by workspace. */
67
458
  listByWorkspace: (workspaceId: string, options?: RequestOptions) => Promise<unknown>;
68
459
  /** Create a company. */
69
- create: (attributes: Record<string, unknown>, options?: RequestOptions) => Promise<unknown>;
460
+ create: (attributes: CreateCrmCompanyAttributes, options?: RequestOptions) => Promise<unknown>;
70
461
  /** Update a company. */
71
- update: (id: string, attributes: Record<string, unknown>, options?: RequestOptions) => Promise<unknown>;
462
+ update: (id: string, attributes: UpdateCrmCompanyAttributes, options?: RequestOptions) => Promise<unknown>;
72
463
  /** Delete a company. */
73
464
  delete: (id: string, options?: RequestOptions) => Promise<unknown>;
74
465
  };
@@ -78,11 +469,11 @@ export declare function createCrmNamespace(rb: RequestBuilder): {
78
469
  /** List deals by workspace. */
79
470
  listByWorkspace: (workspaceId: string, options?: RequestOptions) => Promise<unknown>;
80
471
  /** Create a deal. */
81
- create: (attributes: Record<string, unknown>, options?: RequestOptions) => Promise<unknown>;
472
+ create: (attributes: CreateCrmDealAttributes, options?: RequestOptions) => Promise<unknown>;
82
473
  /** Update a deal. */
83
- update: (id: string, attributes: Record<string, unknown>, options?: RequestOptions) => Promise<unknown>;
474
+ update: (id: string, attributes: UpdateCrmDealAttributes, options?: RequestOptions) => Promise<unknown>;
84
475
  /** Move a deal to a different pipeline stage. */
85
- moveStage: (id: string, attributes: Record<string, unknown>, options?: RequestOptions) => Promise<unknown>;
476
+ moveStage: (id: string, attributes: MoveDealStageAttributes, options?: RequestOptions) => Promise<unknown>;
86
477
  /** Delete a deal. */
87
478
  delete: (id: string, options?: RequestOptions) => Promise<unknown>;
88
479
  };
@@ -92,9 +483,9 @@ export declare function createCrmNamespace(rb: RequestBuilder): {
92
483
  /** List activities by workspace. */
93
484
  listByWorkspace: (workspaceId: string, options?: RequestOptions) => Promise<unknown>;
94
485
  /** Create an activity. */
95
- create: (attributes: Record<string, unknown>, options?: RequestOptions) => Promise<unknown>;
486
+ create: (attributes: CreateCrmActivityAttributes, options?: RequestOptions) => Promise<unknown>;
96
487
  /** Update an activity. */
97
- update: (id: string, attributes: Record<string, unknown>, options?: RequestOptions) => Promise<unknown>;
488
+ update: (id: string, attributes: UpdateCrmActivityAttributes, options?: RequestOptions) => Promise<unknown>;
98
489
  /** Delete an activity. */
99
490
  delete: (id: string, options?: RequestOptions) => Promise<unknown>;
100
491
  };
@@ -104,9 +495,9 @@ export declare function createCrmNamespace(rb: RequestBuilder): {
104
495
  /** List pipelines by workspace. */
105
496
  listByWorkspace: (workspaceId: string, options?: RequestOptions) => Promise<unknown>;
106
497
  /** Create a pipeline. */
107
- create: (attributes: Record<string, unknown>, options?: RequestOptions) => Promise<unknown>;
498
+ create: (attributes: CreateCrmPipelineAttributes, options?: RequestOptions) => Promise<unknown>;
108
499
  /** Update a pipeline. */
109
- update: (id: string, attributes: Record<string, unknown>, options?: RequestOptions) => Promise<unknown>;
500
+ update: (id: string, attributes: UpdateCrmPipelineAttributes, options?: RequestOptions) => Promise<unknown>;
110
501
  /** Delete a pipeline. */
111
502
  delete: (id: string, options?: RequestOptions) => Promise<unknown>;
112
503
  };
@@ -116,9 +507,9 @@ export declare function createCrmNamespace(rb: RequestBuilder): {
116
507
  /** List stages for a specific pipeline. */
117
508
  listByPipeline: (pipelineId: string, options?: RequestOptions) => Promise<unknown>;
118
509
  /** Create a pipeline stage. */
119
- create: (attributes: Record<string, unknown>, options?: RequestOptions) => Promise<unknown>;
510
+ create: (attributes: CreateCrmPipelineStageAttributes, options?: RequestOptions) => Promise<unknown>;
120
511
  /** Update a pipeline stage. */
121
- update: (id: string, attributes: Record<string, unknown>, options?: RequestOptions) => Promise<unknown>;
512
+ update: (id: string, attributes: UpdateCrmPipelineStageAttributes, options?: RequestOptions) => Promise<unknown>;
122
513
  /** Delete a pipeline stage. */
123
514
  delete: (id: string, options?: RequestOptions) => Promise<unknown>;
124
515
  };
@@ -128,7 +519,7 @@ export declare function createCrmNamespace(rb: RequestBuilder): {
128
519
  /** List relationships by workspace. */
129
520
  listByWorkspace: (workspaceId: string, options?: RequestOptions) => Promise<unknown>;
130
521
  /** Create a relationship. */
131
- create: (attributes: Record<string, unknown>, options?: RequestOptions) => Promise<unknown>;
522
+ create: (attributes: CreateCrmRelationshipAttributes, options?: RequestOptions) => Promise<unknown>;
132
523
  /** Delete a relationship. */
133
524
  delete: (id: string, options?: RequestOptions) => Promise<unknown>;
134
525
  };
@@ -138,9 +529,9 @@ export declare function createCrmNamespace(rb: RequestBuilder): {
138
529
  /** List all relationship types. */
139
530
  list: (options?: RequestOptions) => Promise<unknown>;
140
531
  /** Create a relationship type. */
141
- create: (attributes: Record<string, unknown>, options?: RequestOptions) => Promise<unknown>;
532
+ create: (attributes: CreateCrmRelationshipTypeAttributes, options?: RequestOptions) => Promise<unknown>;
142
533
  /** Update a relationship type. */
143
- update: (id: string, attributes: Record<string, unknown>, options?: RequestOptions) => Promise<unknown>;
534
+ update: (id: string, attributes: UpdateCrmRelationshipTypeAttributes, options?: RequestOptions) => Promise<unknown>;
144
535
  /** Delete a relationship type. */
145
536
  delete: (id: string, options?: RequestOptions) => Promise<unknown>;
146
537
  };
@@ -150,9 +541,9 @@ export declare function createCrmNamespace(rb: RequestBuilder): {
150
541
  /** List custom entities by workspace. */
151
542
  listByWorkspace: (workspaceId: string, options?: RequestOptions) => Promise<unknown>;
152
543
  /** Create a custom entity. */
153
- create: (attributes: Record<string, unknown>, options?: RequestOptions) => Promise<unknown>;
544
+ create: (attributes: CreateCrmCustomEntityAttributes, options?: RequestOptions) => Promise<unknown>;
154
545
  /** Update a custom entity. */
155
- update: (id: string, attributes: Record<string, unknown>, options?: RequestOptions) => Promise<unknown>;
546
+ update: (id: string, attributes: UpdateCrmCustomEntityAttributes, options?: RequestOptions) => Promise<unknown>;
156
547
  /** Delete a custom entity. */
157
548
  delete: (id: string, options?: RequestOptions) => Promise<unknown>;
158
549
  /** List versions for a custom entity. */
@@ -166,7 +557,7 @@ export declare function createCrmNamespace(rb: RequestBuilder): {
166
557
  /** Get a deal product by ID. */
167
558
  get: (id: string, options?: RequestOptions) => Promise<unknown>;
168
559
  /** Create a deal product. */
169
- create: (attributes: Record<string, unknown>, options?: RequestOptions) => Promise<unknown>;
560
+ create: (attributes: CreateCrmDealProductAttributes, options?: RequestOptions) => Promise<unknown>;
170
561
  /** Delete a deal product. */
171
562
  delete: (id: string, options?: RequestOptions) => Promise<unknown>;
172
563
  };
@@ -176,7 +567,7 @@ export declare function createCrmNamespace(rb: RequestBuilder): {
176
567
  /** List export jobs by workspace. */
177
568
  listByWorkspace: (workspaceId: string, options?: RequestOptions) => Promise<unknown>;
178
569
  /** Create an export job. */
179
- create: (attributes: Record<string, unknown>, options?: RequestOptions) => Promise<unknown>;
570
+ create: (attributes: CreateCrmDataExportAttributes, options?: RequestOptions) => Promise<unknown>;
180
571
  /** Refresh a pre-signed download URL for an export. */
181
572
  refreshUrl: (id: string, options?: RequestOptions) => Promise<unknown>;
182
573
  };
@@ -186,9 +577,9 @@ export declare function createCrmNamespace(rb: RequestBuilder): {
186
577
  /** List entity types by application. */
187
578
  listByApplication: (applicationId: string, options?: RequestOptions) => Promise<unknown>;
188
579
  /** Create an entity type. */
189
- create: (attributes: Record<string, unknown>, options?: RequestOptions) => Promise<unknown>;
580
+ create: (attributes: CreateCrmCustomEntityTypeAttributes, options?: RequestOptions) => Promise<unknown>;
190
581
  /** Update an entity type. */
191
- update: (id: string, attributes: Record<string, unknown>, options?: RequestOptions) => Promise<unknown>;
582
+ update: (id: string, attributes: UpdateCrmCustomEntityTypeAttributes, options?: RequestOptions) => Promise<unknown>;
192
583
  /** Delete an entity type. */
193
584
  delete: (id: string, options?: RequestOptions) => Promise<unknown>;
194
585
  };
@@ -198,9 +589,9 @@ export declare function createCrmNamespace(rb: RequestBuilder): {
198
589
  /** List field definitions by entity type. */
199
590
  listByEntityType: (entityType: string, options?: RequestOptions) => Promise<unknown>;
200
591
  /** Create a field definition. */
201
- create: (attributes: Record<string, unknown>, options?: RequestOptions) => Promise<unknown>;
592
+ create: (attributes: CreateCrmCustomFieldDefinitionAttributes, options?: RequestOptions) => Promise<unknown>;
202
593
  /** Update a field definition. */
203
- update: (id: string, attributes: Record<string, unknown>, options?: RequestOptions) => Promise<unknown>;
594
+ update: (id: string, attributes: UpdateCrmCustomFieldDefinitionAttributes, options?: RequestOptions) => Promise<unknown>;
204
595
  /** Delete a field definition. */
205
596
  delete: (id: string, options?: RequestOptions) => Promise<unknown>;
206
597
  };
@@ -208,19 +599,140 @@ export declare function createCrmNamespace(rb: RequestBuilder): {
208
599
  /** Get channel capture config by ID. */
209
600
  get: (id: string, options?: RequestOptions) => Promise<unknown>;
210
601
  /** Create or upsert channel capture config. */
211
- create: (attributes: Record<string, unknown>, options?: RequestOptions) => Promise<unknown>;
602
+ create: (attributes: CreateCrmChannelCaptureConfigAttributes, options?: RequestOptions) => Promise<unknown>;
212
603
  /** Update channel capture config. */
213
- update: (id: string, attributes: Record<string, unknown>, options?: RequestOptions) => Promise<unknown>;
604
+ update: (id: string, attributes: UpdateCrmChannelCaptureConfigAttributes, options?: RequestOptions) => Promise<unknown>;
214
605
  };
215
606
  syncConfigs: {
216
607
  /** List sync configs by workspace. */
217
608
  listByWorkspace: (workspaceId: string, options?: RequestOptions) => Promise<unknown>;
218
609
  /** Create a sync config. */
219
- create: (attributes: Record<string, unknown>, options?: RequestOptions) => Promise<unknown>;
610
+ create: (attributes: CreateCrmSyncConfigAttributes, options?: RequestOptions) => Promise<unknown>;
220
611
  /** Update a sync config. */
221
- update: (id: string, attributes: Record<string, unknown>, options?: RequestOptions) => Promise<unknown>;
612
+ update: (id: string, attributes: UpdateCrmSyncConfigAttributes, options?: RequestOptions) => Promise<unknown>;
222
613
  /** Delete a sync config. */
223
614
  delete: (id: string, options?: RequestOptions) => Promise<unknown>;
224
615
  };
616
+ /**
617
+ * Addresses — physical/mailing addresses for contacts and companies.
618
+ */
619
+ addresses: {
620
+ /** Fetch a single address by ID. */
621
+ get: (id: string, options?: RequestOptions) => Promise<unknown>;
622
+ /** Create a new address. */
623
+ create: (attributes: CreateCrmAddressAttributes, options?: RequestOptions) => Promise<unknown>;
624
+ /** Update an address. */
625
+ update: (id: string, attributes: UpdateCrmAddressAttributes, options?: RequestOptions) => Promise<unknown>;
626
+ /** Delete an address. */
627
+ delete: (id: string, options?: RequestOptions) => Promise<unknown>;
628
+ /** Mark an address as the primary for its entity. */
629
+ setPrimary: (id: string, options?: RequestOptions) => Promise<unknown>;
630
+ /** List addresses for a specific entity. */
631
+ listByEntity: (entityType: "contact" | "company", entityId: string, options?: RequestOptions) => Promise<unknown>;
632
+ };
633
+ /**
634
+ * Phone numbers — phone numbers for contacts and companies.
635
+ */
636
+ phoneNumbers: {
637
+ /** Fetch a single phone number by ID. */
638
+ get: (id: string, options?: RequestOptions) => Promise<unknown>;
639
+ /** Create a new phone number. */
640
+ create: (attributes: CreateCrmPhoneNumberAttributes, options?: RequestOptions) => Promise<unknown>;
641
+ /** Update a phone number. */
642
+ update: (id: string, attributes: UpdateCrmPhoneNumberAttributes, options?: RequestOptions) => Promise<unknown>;
643
+ /** Delete a phone number. */
644
+ delete: (id: string, options?: RequestOptions) => Promise<unknown>;
645
+ /** Mark a phone number as the primary for its entity. */
646
+ setPrimary: (id: string, options?: RequestOptions) => Promise<unknown>;
647
+ /** List phone numbers for a specific entity. */
648
+ listByEntity: (entityType: "contact" | "company", entityId: string, options?: RequestOptions) => Promise<unknown>;
649
+ };
650
+ /**
651
+ * Email addresses — email addresses for contacts and companies.
652
+ */
653
+ emailAddresses: {
654
+ /** Fetch a single email address by ID. */
655
+ get: (id: string, options?: RequestOptions) => Promise<unknown>;
656
+ /** Create a new email address. */
657
+ create: (attributes: CreateCrmEmailAddressAttributes, options?: RequestOptions) => Promise<unknown>;
658
+ /** Update an email address. */
659
+ update: (id: string, attributes: UpdateCrmEmailAddressAttributes, options?: RequestOptions) => Promise<unknown>;
660
+ /** Delete an email address. */
661
+ delete: (id: string, options?: RequestOptions) => Promise<unknown>;
662
+ /** Mark an email address as the primary for its entity. */
663
+ setPrimary: (id: string, options?: RequestOptions) => Promise<unknown>;
664
+ /** List email addresses for a specific entity. */
665
+ listByEntity: (entityType: "contact" | "company", entityId: string, options?: RequestOptions) => Promise<unknown>;
666
+ };
667
+ /**
668
+ * Social profiles — social media profiles for contacts and companies.
669
+ */
670
+ socialProfiles: {
671
+ /** Fetch a single social profile by ID. */
672
+ get: (id: string, options?: RequestOptions) => Promise<unknown>;
673
+ /** Create a new social profile. */
674
+ create: (attributes: CreateCrmSocialProfileAttributes, options?: RequestOptions) => Promise<unknown>;
675
+ /** Update a social profile. */
676
+ update: (id: string, attributes: UpdateCrmSocialProfileAttributes, options?: RequestOptions) => Promise<unknown>;
677
+ /** Delete a social profile. */
678
+ delete: (id: string, options?: RequestOptions) => Promise<unknown>;
679
+ /** List social profiles for a specific entity. */
680
+ listByEntity: (entityType: "contact" | "company", entityId: string, options?: RequestOptions) => Promise<unknown>;
681
+ };
682
+ /**
683
+ * Websites — website URLs for contacts and companies.
684
+ */
685
+ websites: {
686
+ /** Fetch a single website by ID. */
687
+ get: (id: string, options?: RequestOptions) => Promise<unknown>;
688
+ /** Create a new website. */
689
+ create: (attributes: CreateCrmWebsiteAttributes, options?: RequestOptions) => Promise<unknown>;
690
+ /** Update a website. */
691
+ update: (id: string, attributes: UpdateCrmWebsiteAttributes, options?: RequestOptions) => Promise<unknown>;
692
+ /** Delete a website. */
693
+ delete: (id: string, options?: RequestOptions) => Promise<unknown>;
694
+ /** Mark a website as the primary for its entity. */
695
+ setPrimary: (id: string, options?: RequestOptions) => Promise<unknown>;
696
+ /** List websites for a specific entity. */
697
+ listByEntity: (entityType: "contact" | "company", entityId: string, options?: RequestOptions) => Promise<unknown>;
698
+ };
699
+ /**
700
+ * Graph traversal sub-namespace for querying the CRM relationship graph.
701
+ */
702
+ graph: {
703
+ /** Find paths between two CRM entities via relationship graph. */
704
+ paths(params: CrmGraphPathsParams, options?: RequestOptions): Promise<unknown>;
705
+ /** Get entities related to a given entity within N hops. */
706
+ related(params: CrmGraphRelatedParams, options?: RequestOptions): Promise<unknown>;
707
+ /** Compute relationship strength between two entities. */
708
+ strength(params: CrmGraphStrengthParams, options?: RequestOptions): Promise<unknown>;
709
+ };
710
+ /**
711
+ * AI augmentation sub-namespace for CRM intelligence features.
712
+ */
713
+ ai: {
714
+ /** List staged AI entity extractions for review. */
715
+ stagedExtractions(workspaceId: string, options?: {
716
+ entity_type?: string;
717
+ status?: string;
718
+ } & RequestOptions): Promise<unknown>;
719
+ /** Approve a staged extraction (creates the entity). */
720
+ approveExtraction(id: string, options?: RequestOptions): Promise<unknown>;
721
+ /** Reject a staged extraction. */
722
+ rejectExtraction(id: string, options?: RequestOptions): Promise<unknown>;
723
+ /** List duplicate candidates in a workspace. */
724
+ duplicates(workspaceId: string, options?: {
725
+ entity_type?: string;
726
+ status?: string;
727
+ } & RequestOptions): Promise<unknown>;
728
+ /** Merge two contacts into one (primary absorbs secondary). */
729
+ mergeContacts(params: CrmMergeParams, options?: RequestOptions): Promise<unknown>;
730
+ /** Merge two companies into one (primary absorbs secondary). */
731
+ mergeCompanies(params: CrmMergeParams, options?: RequestOptions): Promise<unknown>;
732
+ /** Hybrid CRM search (lexical + semantic). */
733
+ search(params: CrmSearchParams, options?: RequestOptions): Promise<unknown>;
734
+ /** Run AI deal forecasting for a workspace. */
735
+ forecast(workspaceId: string, options?: RequestOptions): Promise<unknown>;
736
+ };
225
737
  };
226
738
  //# sourceMappingURL=crm.d.ts.map