@graph8/sdk 0.302.0 → 0.303.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.
@@ -5,6 +5,6 @@
5
5
  * both together (the version-parity gate already pins package.json, the
6
6
  * lockfile and the CHANGELOG to each other).
7
7
  */
8
- export declare const SDK_VERSION = "0.302.0";
8
+ export declare const SDK_VERSION = "0.303.0";
9
9
  /** Value of the `X-G8-Client` header every SDK request carries (I-13). */
10
- export declare const SDK_CLIENT_ID = "js-sdk/0.302.0";
10
+ export declare const SDK_CLIENT_ID = "js-sdk/0.303.0";
package/docs/agents.md CHANGED
@@ -9,7 +9,7 @@ grows every week and your training data is older than this file.
9
9
 
10
10
  graph8 is a B2B go-to-market platform: CRM (contacts, companies, deals, custom objects), a 700M-person
11
11
  data index with enrichment, intent signals, sequences and campaigns across email/SMS/LinkedIn/voice, a unified
12
- inbox, meetings, workflows and more. This SDK reaches all of it: **3258 Developer API
12
+ inbox, meetings, workflows and more. This SDK reaches all of it: **3264 Developer API
13
13
  operations** in 141 areas.
14
14
 
15
15
  ## 1. The short version
@@ -92,7 +92,7 @@ g8.init({ apiKey: process.env.G8_API_KEY! });
92
92
  | | Hand-written clients | `g8.api` (generated) |
93
93
  |---|---|---|
94
94
  | Example | `g8.contacts.upsert({ list_id, work_email })` | `g8.api.assertUpsert.assertContact({ body: { list_id, work_email } })` |
95
- | Coverage | 289 methods, reaching 258 operations | all 3258 operations |
95
+ | Coverage | 289 methods, reaching 258 operations | all 3264 operations |
96
96
  | Returns | the unwrapped value (usually `data`) | the full envelope; read `result.data` |
97
97
  | Arguments | positional / friendly names | `{ path?, query?, headers?, body? }`, exactly as the contract names them |
98
98
  | Reference | [sdk-clients.md](sdk-clients.md) | [api/README.md](api/README.md) |
@@ -141,7 +141,7 @@ Hand-written modules:
141
141
  | [`g8.webhooks`](sdk-clients.md#g8-webhooks) | 1 | API key |
142
142
  | [`g8.workflows`](sdk-clients.md#g8-workflows) | 21 | API key |
143
143
 
144
- `g8.api` namespaces (operation counts): `accounts` (16), `adCampaigns` (19), `adCreatives` (40), `agency` (24), `agent` (8), `agents` (65), `aiInbox` (79), `analytics` (51), `apiKeys` (6), `appDeployments` (7), `appDomains` (5), `appLogs` (2), `appObjects` (10), `appPages` (16), `appPlatformTokens` (3), `appointments` (92), `apps` (22), `assertUpsert` (6), `audienceSyncs` (8), `brandKit` (30), `bugReports` (7), `calendarInvites` (3), `campaignWorkflows` (5), `campaigns` (29), `channels` (5), `cliCampaigns` (6), `cliPipelines` (12), `clickHouse` (2), `companies` (50), `companyIntelligence` (14), `contacts` (70), `content` (41), `contentGridSkills` (6), `copilot` (39), `crmSyncs` (6), `customerSuccess` (19), `deals` (48), `deliverability` (17), `desk` (71), `dialer` (46), `dialerAnalytics` (6), `documents` (35), `duplicates` (7), `eSign` (1), `eSignature` (7), `enrichment` (115), `events` (1), `fields` (8), `forms` (35), `gtmCampaigns` (22), `gtmContext` (51), `gtmDeliverability` (1), `gtmKnowledgeBase` (2), `gtmLaunchHelpers` (2), `gtmLibrary` (20), `health` (1), `imageLibrary` (14), `imports` (3), `inbox` (22), `install` (6), `installedApps` (4), `integrationStatus` (6), `integrations` (83), `intent` (16), `knowledge` (21), `knowledgeBase` (2), `landingPages` (59), `leads` (4), `library` (9), `linkedIn` (5), `linkedInOutreach` (20), `lists` (36), `logs` (1), `mailboxes` (38), `marketingIntelligence` (10), `marketplace` (142), `mcp` (1), `me` (1), `meetings` (17), `newsletter` (61), `notes` (19), `notifications` (2), `objects` (18), `openSearch` (4), `ops` (5), `orgGovernance` (17), `orgVideos` (6), `organizationSettings` (22), `phoneNumbers` (16), `profile` (14), `programmaticPages` (15), `providerDomains` (34), `providerUsage` (5), `public` (1), `publicCopilot` (1), `publicSignals` (1), `publicVisitors` (2), `quotes` (56), `radar` (42), `radarReports` (8), `recordRoles` (4), `repos` (4), `research` (13), `revenue` (14), `revenueAnalytics` (6), `revenueLifecycle` (5), `revenueRecords` (15), `roles` (21), `salesCoach` (37), `sandbox` (9), `scans` (2), `scheduleBuy` (9), `scraping` (10), `sdrAnalytics` (5), `search` (19), `seo` (14), `sequenceLifecycle` (8), `sequences` (71), `settings` (18), `signals` (56), `signatures` (24), `skills` (12), `snippet` (3), `socialPublishing` (22), `studioDocuments` (9), `support` (1), `suppressions` (6), `surveys` (21), `tasks` (25), `teamMembers` (21), `teams` (35), `usage` (9), `visitors` (26), `voice` (187), `webAnalytics` (38), `webChat` (46), `webhooks` (8), `websiteEditor` (12), `work` (59), `workbench` (107), `workflows` (59).
144
+ `g8.api` namespaces (operation counts): `accounts` (16), `adCampaigns` (19), `adCreatives` (40), `agency` (24), `agent` (8), `agents` (65), `aiInbox` (79), `analytics` (51), `apiKeys` (6), `appDeployments` (7), `appDomains` (5), `appLogs` (2), `appObjects` (10), `appPages` (16), `appPlatformTokens` (3), `appointments` (92), `apps` (22), `assertUpsert` (6), `audienceSyncs` (8), `brandKit` (30), `bugReports` (7), `calendarInvites` (3), `campaignWorkflows` (5), `campaigns` (29), `channels` (5), `cliCampaigns` (6), `cliPipelines` (12), `clickHouse` (2), `companies` (50), `companyIntelligence` (14), `contacts` (70), `content` (41), `contentGridSkills` (6), `copilot` (39), `crmSyncs` (6), `customerSuccess` (19), `deals` (48), `deliverability` (17), `desk` (71), `dialer` (46), `dialerAnalytics` (6), `documents` (35), `duplicates` (7), `eSign` (1), `eSignature` (7), `enrichment` (115), `events` (1), `fields` (8), `forms` (35), `gtmCampaigns` (22), `gtmContext` (51), `gtmDeliverability` (1), `gtmKnowledgeBase` (2), `gtmLaunchHelpers` (2), `gtmLibrary` (20), `health` (1), `imageLibrary` (14), `imports` (3), `inbox` (22), `install` (6), `installedApps` (4), `integrationStatus` (6), `integrations` (83), `intent` (16), `knowledge` (21), `knowledgeBase` (2), `landingPages` (59), `leads` (4), `library` (9), `linkedIn` (5), `linkedInOutreach` (20), `lists` (36), `logs` (1), `mailboxes` (38), `marketingIntelligence` (10), `marketplace` (142), `mcp` (1), `me` (1), `meetings` (17), `newsletter` (61), `notes` (19), `notifications` (2), `objects` (24), `openSearch` (4), `ops` (5), `orgGovernance` (17), `orgVideos` (6), `organizationSettings` (22), `phoneNumbers` (16), `profile` (14), `programmaticPages` (15), `providerDomains` (34), `providerUsage` (5), `public` (1), `publicCopilot` (1), `publicSignals` (1), `publicVisitors` (2), `quotes` (56), `radar` (42), `radarReports` (8), `recordRoles` (4), `repos` (4), `research` (13), `revenue` (14), `revenueAnalytics` (6), `revenueLifecycle` (5), `revenueRecords` (15), `roles` (21), `salesCoach` (37), `sandbox` (9), `scans` (2), `scheduleBuy` (9), `scraping` (10), `sdrAnalytics` (5), `search` (19), `seo` (14), `sequenceLifecycle` (8), `sequences` (71), `settings` (18), `signals` (56), `signatures` (24), `skills` (12), `snippet` (3), `socialPublishing` (22), `studioDocuments` (9), `support` (1), `suppressions` (6), `surveys` (21), `tasks` (25), `teamMembers` (21), `teams` (35), `usage` (9), `visitors` (26), `voice` (187), `webAnalytics` (38), `webChat` (46), `webhooks` (8), `websiteEditor` (12), `work` (59), `workbench` (107), `workflows` (59).
145
145
 
146
146
  ## 5. How to find the right call
147
147
 
@@ -196,9 +196,9 @@ Every operation carries a tier:
196
196
 
197
197
  | Tier | What it means | Count |
198
198
  |---|---|---|
199
- | `read` | reads data; safe to call and to retry | 1513 |
200
- | `write` | creates or changes records; the SDK sends an Idempotency-Key and retries transient failures | 811 |
201
- | `destructive` | deletes or archives data; confirm with a human before calling | 300 |
199
+ | `read` | reads data; safe to call and to retry | 1515 |
200
+ | `write` | creates or changes records; the SDK sends an Idempotency-Key and retries transient failures | 814 |
201
+ | `destructive` | deletes or archives data; confirm with a human before calling | 301 |
202
202
  | `billable` | spends credits; the SDK never blindly retries it; confirm cost before bulk use | 383 |
203
203
  | `external` | reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first | 251 |
204
204
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  # `g8.api`: every Developer API operation
4
4
 
5
- `g8.api` is generated from the published OpenAPI contract, so it covers all 3258 operations across 141 namespaces (1513 read, 811 write, 300 destructive, 383 billable, 251 external).
5
+ `g8.api` is generated from the published OpenAPI contract, so it covers all 3264 operations across 141 namespaces (1515 read, 814 write, 301 destructive, 383 billable, 251 external).
6
6
 
7
7
  - Found a REST path in a curl example or the web docs? Look it up in [by-path.md](by-path.md).
8
8
  - Prefer a hand-written method where one exists: [../sdk-clients.md](../sdk-clients.md).
@@ -104,7 +104,7 @@
104
104
  | `g8.api.newsletter` | Newsletter | 61 | 15 | [newsletter.md](newsletter.md) | [newsletter.d.ts](newsletter.d.ts) |
105
105
  | `g8.api.notes` | Notes | 19 | 8 | [notes.md](notes.md) | [notes.d.ts](notes.d.ts) |
106
106
  | `g8.api.notifications` | Notifications | 2 | none | [notifications.md](notifications.md) | [notifications.d.ts](notifications.d.ts) |
107
- | `g8.api.objects` | Objects | 18 | 18 | [objects.md](objects.md) | [objects.d.ts](objects.d.ts) |
107
+ | `g8.api.objects` | Objects | 24 | 18 | [objects.md](objects.md) | [objects.d.ts](objects.d.ts) |
108
108
  | `g8.api.openSearch` | OpenSearch | 4 | none | [openSearch.md](openSearch.md) | [openSearch.d.ts](openSearch.d.ts) |
109
109
  | `g8.api.ops` | Ops (internal, cross-tenant, read-only) | 5 | none | [ops.md](ops.md) | [ops.d.ts](ops.d.ts) |
110
110
  | `g8.api.orgGovernance` | Org Governance | 17 | none | [orgGovernance.md](orgGovernance.md) | [orgGovernance.d.ts](orgGovernance.d.ts) |
@@ -2024,13 +2024,19 @@ Every Developer API route, sorted by path, with the SDK call that reaches it. Th
2024
2024
  | PATCH | `/api/v1/objects/{object_slug}/attributes/{attr_slug}` | [`g8.api.objects.updateAttribute`](objects.md#op-updateattribute) or `g8.objects.updateAttribute()` | write |
2025
2025
  | GET | `/api/v1/objects/{object_slug}/records` | [`g8.api.objects.listObjectRecords`](objects.md#op-listobjectrecords) or `g8.objects.listRecords()` | read |
2026
2026
  | POST | `/api/v1/objects/{object_slug}/records` | [`g8.api.objects.createObjectRecord`](objects.md#op-createobjectrecord) or `g8.objects.createRecord()` | write |
2027
+ | PATCH | `/api/v1/objects/{object_slug}/records/bulk` | [`g8.api.objects.bulkUpdateObjectRecords`](objects.md#op-bulkupdateobjectrecords) | write |
2028
+ | POST | `/api/v1/objects/{object_slug}/records/merge` | [`g8.api.objects.mergeObjectRecords`](objects.md#op-mergeobjectrecords) | write |
2027
2029
  | POST | `/api/v1/objects/{object_slug}/records/upsert` | [`g8.api.objects.upsertObjectRecord`](objects.md#op-upsertobjectrecord) or `g8.objects.upsertRecord()` | write |
2028
2030
  | DELETE | `/api/v1/objects/{object_slug}/records/{record_id}` | [`g8.api.objects.archiveObjectRecord`](objects.md#op-archiveobjectrecord) or `g8.objects.archiveRecord()` | destructive |
2029
2031
  | GET | `/api/v1/objects/{object_slug}/records/{record_id}` | [`g8.api.objects.getObjectRecord`](objects.md#op-getobjectrecord) or `g8.objects.getRecord()` | read |
2030
2032
  | PATCH | `/api/v1/objects/{object_slug}/records/{record_id}` | [`g8.api.objects.updateObjectRecord`](objects.md#op-updateobjectrecord) or `g8.objects.updateRecord()` | write |
2031
2033
  | GET | `/api/v1/objects/{object_slug}/records/{record_id}/changes` | [`g8.api.objects.getObjectRecordChanges`](objects.md#op-getobjectrecordchanges) or `g8.objects.changes()` | read |
2032
2034
  | GET | `/api/v1/objects/{object_slug}/records/{record_id}/history` | [`g8.api.objects.getObjectRecordHistory`](objects.md#op-getobjectrecordhistory) or `g8.objects.history()` | read |
2035
+ | GET | `/api/v1/objects/{object_slug}/records/{record_id}/relationships` | [`g8.api.objects.getObjectRelationships`](objects.md#op-getobjectrelationships) | read |
2036
+ | POST | `/api/v1/objects/{object_slug}/records/{record_id}/relationships` | [`g8.api.objects.createObjectRelationship`](objects.md#op-createobjectrelationship) | write |
2037
+ | DELETE | `/api/v1/objects/{object_slug}/records/{record_id}/relationships/{relationship_id}` | [`g8.api.objects.deleteObjectRelationship`](objects.md#op-deleteobjectrelationship) | destructive |
2033
2038
  | POST | `/api/v1/objects/{object_slug}/records/{record_id}/restore` | [`g8.api.objects.restoreObjectRecord`](objects.md#op-restoreobjectrecord) or `g8.objects.restoreRecord()` | write |
2039
+ | GET | `/api/v1/objects/{object_slug}/relationships` | [`g8.api.objects.getObjectRelationshipDefinitions`](objects.md#op-getobjectrelationshipdefinitions) | read |
2034
2040
  | POST | `/api/v1/opensearch/aggregate` | [`g8.api.openSearch.opensearchAggregate`](openSearch.md#op-opensearchaggregate) | write |
2035
2041
  | POST | `/api/v1/opensearch/count` | [`g8.api.openSearch.opensearchCount`](openSearch.md#op-opensearchcount) | write |
2036
2042
  | POST | `/api/v1/opensearch/resolve` | [`g8.api.openSearch.opensearchResolve`](openSearch.md#op-opensearchresolve) | write |
@@ -1,7 +1,7 @@
1
1
  /* Generated by sdk/js/scripts/generate-agent-docs.ts from developer-contract/openapi.json. Regenerated on every build. */
2
2
 
3
3
  /**
4
- * Types for `g8.api.objects` (Objects): 18 operations.
4
+ * Types for `g8.api.objects` (Objects): 24 operations.
5
5
  *
6
6
  * For reading. In code, import from the package instead:
7
7
  * import type { ApiInput, ApiOutput, G8Contract } from "@graph8/sdk";
@@ -16,16 +16,22 @@ export interface ObjectsMembers {
16
16
  archiveAttribute: "archive_attribute_objects__object_slug__attributes__attr_slug__delete";
17
17
  archiveObject: "archive_object_objects__object_slug__delete";
18
18
  archiveObjectRecord: "archive_object_record_objects__object_slug__records__record_id__delete";
19
+ bulkUpdateObjectRecords: "bulk_update_object_records_objects__object_slug__records_bulk_patch";
19
20
  createAttribute: "create_attribute_objects__object_slug__attributes_post";
20
21
  createObject: "create_object_objects_post";
21
22
  createObjectRecord: "create_object_record_objects__object_slug__records_post";
23
+ createObjectRelationship: "create_object_relationship_objects__object_slug__records__record_id__relationships_post";
24
+ deleteObjectRelationship: "delete_object_relationship_objects__object_slug__records__record_id__relationships__relationship_id__delete";
22
25
  getObject: "get_object_objects__object_slug__get";
23
26
  getObjectRecord: "get_object_record_objects__object_slug__records__record_id__get";
24
27
  getObjectRecordChanges: "get_object_record_changes_objects__object_slug__records__record_id__changes_get";
25
28
  getObjectRecordHistory: "get_object_record_history_objects__object_slug__records__record_id__history_get";
29
+ getObjectRelationshipDefinitions: "get_object_relationship_definitions_objects__object_slug__relationships_get";
30
+ getObjectRelationships: "get_object_relationships_objects__object_slug__records__record_id__relationships_get";
26
31
  listObjectAttributes: "list_object_attributes_objects__object_slug__attributes_get";
27
32
  listObjectRecords: "list_object_records_objects__object_slug__records_get";
28
33
  listObjects: "list_objects_objects_get";
34
+ mergeObjectRecords: "merge_object_records_objects__object_slug__records_merge_post";
29
35
  restoreObjectRecord: "restore_object_record_objects__object_slug__records__record_id__restore_post";
30
36
  updateAttribute: "update_attribute_objects__object_slug__attributes__attr_slug__patch";
31
37
  updateObject: "update_object_objects__object_slug__patch";
@@ -85,6 +91,23 @@ export interface ObjectsOperations {
85
91
  };
86
92
  output: ApiResponse_ObjectRecordResponse_;
87
93
  };
94
+ /**
95
+ * PATCH /objects/{object_slug}/records/bulk
96
+ * Bulk Update Object Records
97
+ * tier: write · scope: objects:write
98
+ */
99
+ bulk_update_object_records_objects__object_slug__records_bulk_patch: {
100
+ input: {
101
+ path: {
102
+ object_slug: string;
103
+ };
104
+ headers?: {
105
+ "X-Target-Org-Id"?: string | null;
106
+ };
107
+ body: RecordBulkUpdate;
108
+ };
109
+ output: ApiResponse_RecordBulkUpdateResponse_;
110
+ };
88
111
  /**
89
112
  * POST /objects/{object_slug}/attributes
90
113
  * Create Attribute
@@ -133,6 +156,43 @@ export interface ObjectsOperations {
133
156
  };
134
157
  output: ApiResponse_ObjectRecordResponse_;
135
158
  };
159
+ /**
160
+ * POST /objects/{object_slug}/records/{record_id}/relationships
161
+ * Create Object Relationship
162
+ * tier: write · scope: objects:write
163
+ */
164
+ create_object_relationship_objects__object_slug__records__record_id__relationships_post: {
165
+ input: {
166
+ path: {
167
+ object_slug: string;
168
+ record_id: string;
169
+ };
170
+ headers?: {
171
+ "X-Target-Org-Id"?: string | null;
172
+ };
173
+ body: RelationshipCreate;
174
+ };
175
+ output: ApiResponse_RelationshipResponse_;
176
+ };
177
+ /**
178
+ * DELETE /objects/{object_slug}/records/{record_id}/relationships/{relationship_id}
179
+ * Delete Object Relationship
180
+ * tier: destructive · scope: objects:write
181
+ */
182
+ delete_object_relationship_objects__object_slug__records__record_id__relationships__relationship_id__delete: {
183
+ input: {
184
+ path: {
185
+ object_slug: string;
186
+ record_id: string;
187
+ relationship_id: string;
188
+ };
189
+ headers?: {
190
+ "X-Target-Org-Id"?: string | null;
191
+ };
192
+ body: RelationshipCreate;
193
+ };
194
+ output: ApiResponse_RelationshipResponse_;
195
+ };
136
196
  /**
137
197
  * GET /objects/{object_slug}
138
198
  * Get Object
@@ -208,6 +268,47 @@ export interface ObjectsOperations {
208
268
  };
209
269
  output: ApiResponse_RecordHistoryResponse_;
210
270
  };
271
+ /**
272
+ * GET /objects/{object_slug}/relationships
273
+ * Get Object Relationship Definitions
274
+ * tier: read · scope: objects:read
275
+ */
276
+ get_object_relationship_definitions_objects__object_slug__relationships_get: {
277
+ input: {
278
+ path: {
279
+ object_slug: string;
280
+ };
281
+ query?: {
282
+ limit?: number;
283
+ offset?: number;
284
+ };
285
+ headers?: {
286
+ "X-Target-Org-Id"?: string | null;
287
+ };
288
+ };
289
+ output: ApiResponse_RelationshipDefinitionListResponse_;
290
+ };
291
+ /**
292
+ * GET /objects/{object_slug}/records/{record_id}/relationships
293
+ * Get Object Relationships
294
+ * tier: read · scope: objects:read
295
+ */
296
+ get_object_relationships_objects__object_slug__records__record_id__relationships_get: {
297
+ input: {
298
+ path: {
299
+ object_slug: string;
300
+ record_id: string;
301
+ };
302
+ query?: {
303
+ limit?: number;
304
+ offset?: number;
305
+ };
306
+ headers?: {
307
+ "X-Target-Org-Id"?: string | null;
308
+ };
309
+ };
310
+ output: ApiResponse_RecordRelationshipsResponse_;
311
+ };
211
312
  /**
212
313
  * GET /objects/{object_slug}/attributes
213
314
  * List Object Attributes
@@ -267,6 +368,23 @@ export interface ObjectsOperations {
267
368
  };
268
369
  output: ApiResponse_list_ObjectDefinitionResponse__;
269
370
  };
371
+ /**
372
+ * POST /objects/{object_slug}/records/merge
373
+ * Merge Object Records
374
+ * tier: write · scope: objects:write
375
+ */
376
+ merge_object_records_objects__object_slug__records_merge_post: {
377
+ input: {
378
+ path: {
379
+ object_slug: string;
380
+ };
381
+ headers?: {
382
+ "X-Target-Org-Id"?: string | null;
383
+ };
384
+ body: RecordMergeRequest;
385
+ };
386
+ output: ApiResponse_RecordMergeResponse_;
387
+ };
270
388
  /**
271
389
  * POST /objects/{object_slug}/records/{record_id}/restore
272
390
  * Restore Object Record
@@ -356,7 +474,7 @@ export interface ObjectsOperations {
356
474
  };
357
475
  }
358
476
 
359
- // 26 schemas referenced above (the same as G8Contract.<Name>).
477
+ // 46 schemas referenced above (the same as G8Contract.<Name>).
360
478
 
361
479
  export interface ApiResponse_AttributeDefinitionResponse_ {
362
480
  data: AttributeDefinitionResponse;
@@ -373,16 +491,41 @@ export interface ApiResponse_ObjectRecordResponse_ {
373
491
  pagination?: PaginationMeta | null;
374
492
  }
375
493
 
494
+ export interface ApiResponse_RecordBulkUpdateResponse_ {
495
+ data: RecordBulkUpdateResponse;
496
+ pagination?: PaginationMeta | null;
497
+ }
498
+
376
499
  export interface ApiResponse_RecordHistoryResponse_ {
377
500
  data: RecordHistoryResponse;
378
501
  pagination?: PaginationMeta | null;
379
502
  }
380
503
 
504
+ export interface ApiResponse_RecordMergeResponse_ {
505
+ data: RecordMergeResponse;
506
+ pagination?: PaginationMeta | null;
507
+ }
508
+
381
509
  export interface ApiResponse_RecordMutationsResponse_ {
382
510
  data: RecordMutationsResponse;
383
511
  pagination?: PaginationMeta | null;
384
512
  }
385
513
 
514
+ export interface ApiResponse_RecordRelationshipsResponse_ {
515
+ data: RecordRelationshipsResponse;
516
+ pagination?: PaginationMeta | null;
517
+ }
518
+
519
+ export interface ApiResponse_RelationshipDefinitionListResponse_ {
520
+ data: RelationshipDefinitionListResponse;
521
+ pagination?: PaginationMeta | null;
522
+ }
523
+
524
+ export interface ApiResponse_RelationshipResponse_ {
525
+ data: RelationshipResponse;
526
+ pagination?: PaginationMeta | null;
527
+ }
528
+
386
529
  export interface ApiResponse_list_AttributeDefinitionResponse__ {
387
530
  data: Array<AttributeDefinitionResponse>;
388
531
  pagination?: PaginationMeta | null;
@@ -539,6 +682,42 @@ export interface PaginationMeta {
539
682
  total_is_lower_bound?: boolean | null;
540
683
  }
541
684
 
685
+ /**
686
+ * Bulk-update body: exactly one scope (explicit ids or a filtered set),
687
+ * plus the values to apply to every record in that scope.
688
+ *
689
+ * ``record_ids`` is capped at 500 to bound the transaction. ``filters`` reuses
690
+ * this router's own ``RecordFilter`` shape; a filtered scope is resolved
691
+ * entirely server-side (ordered by record id, at most 500 per call) and the
692
+ * ids it resolves are never trusted from the client. ``after_record_id``
693
+ * continues a filtered scope that the previous call reported as truncated.
694
+ */
695
+ export interface RecordBulkUpdate {
696
+ after_record_id?: string | null;
697
+ filters?: Array<RecordFilter> | null;
698
+ record_ids?: Array<string> | null;
699
+ values?: Record<string, unknown>;
700
+ }
701
+
702
+ export interface RecordBulkUpdateFailure {
703
+ error: string;
704
+ id: string;
705
+ }
706
+
707
+ export interface RecordBulkUpdateResponse {
708
+ failed: Array<RecordBulkUpdateFailure>;
709
+ next_after_record_id?: string | null;
710
+ succeeded: Array<string>;
711
+ truncated?: boolean;
712
+ }
713
+
714
+ /** Filter parameters for listing records. */
715
+ export interface RecordFilter {
716
+ attribute_slug: string;
717
+ operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "starts_with" | "is_null" | "is_not_null";
718
+ value?: unknown | null;
719
+ }
720
+
542
721
  /**
543
722
  * One generation of one attribute's value.
544
723
  *
@@ -566,6 +745,37 @@ export interface RecordHistoryResponse {
566
745
  record_id: string;
567
746
  }
568
747
 
748
+ export interface RecordMergeCascade {
749
+ associations_deleted: number;
750
+ associations_repointed: number;
751
+ relationships_deleted: number;
752
+ relationships_repointed: number;
753
+ }
754
+
755
+ export interface RecordMergeFieldOverride {
756
+ attribute_slug: string;
757
+ winner: "primary" | "secondary";
758
+ }
759
+
760
+ /**
761
+ * Merge ``secondary_record_id`` into ``primary_record_id``. The primary's
762
+ * graph8 identity (id, legacy_id/legacy_type) is preserved; the secondary is
763
+ * archived, never hard-deleted.
764
+ */
765
+ export interface RecordMergeRequest {
766
+ expected_primary_revision?: number | null;
767
+ expected_secondary_revision?: number | null;
768
+ field_overrides?: Array<RecordMergeFieldOverride>;
769
+ primary_record_id: string;
770
+ secondary_record_id: string;
771
+ }
772
+
773
+ export interface RecordMergeResponse {
774
+ cascade: RecordMergeCascade;
775
+ merge_history_id: string;
776
+ record: RecordResponse;
777
+ }
778
+
569
779
  export interface RecordMutationEntry {
570
780
  action: "created" | "updated" | "archived" | "restored";
571
781
  actor_id: string | null;
@@ -594,6 +804,24 @@ export interface RecordMutationsResponse {
594
804
  record_id: string;
595
805
  }
596
806
 
807
+ export interface RecordRelationshipsResponse {
808
+ /** Next visible page offset; null at the end */
809
+ next_offset: number | null;
810
+ relationships: Array<RelatedRecordEdge>;
811
+ }
812
+
813
+ /** Response for a record with its current attribute values. */
814
+ export interface RecordResponse {
815
+ created_at: string;
816
+ id: string;
817
+ is_archived: boolean;
818
+ object_definition_id: string;
819
+ organization_id: string;
820
+ revision?: number;
821
+ updated_at: string;
822
+ values: Record<string, unknown>;
823
+ }
824
+
597
825
  export interface RecordUpdateRequest {
598
826
  /** Append canonical non-duplicate values to multivalue fields. Fields must not overlap values or remove_values. */
599
827
  append_values?: Record<string, Array<unknown>>;
@@ -625,3 +853,61 @@ export interface RecordWriteRequest {
625
853
  /** Attribute values keyed by slug. Call `GET /objects/{object_slug}/attributes` for active fields. Canonical contacts and companies retain CONTACT_*, COMPANY_* and udo_* field names. Unknown keys are rejected with 422. PATCH preserves omitted fields; required fields cannot be cleared with null or an empty multivalue list. Record references must resolve to active records of their configured target object in the same organization and app. */
626
854
  values?: Record<string, unknown>;
627
855
  }
856
+
857
+ export interface RelatedRecordEdge {
858
+ can_unlink: boolean;
859
+ definition_id: string;
860
+ definition_revision: number;
861
+ id: string;
862
+ relationship_label: string;
863
+ source_kind: "custom" | "contacts" | "companies" | "deals";
864
+ source_label: string | null;
865
+ source_object_slug: string;
866
+ source_record_id: string;
867
+ source_revision: number;
868
+ target_kind: "custom" | "contacts" | "companies" | "deals";
869
+ target_label: string | null;
870
+ target_object_slug: string;
871
+ target_record_id: string;
872
+ target_revision: number;
873
+ }
874
+
875
+ export interface RelationshipCreate {
876
+ definition_id: string;
877
+ expected_definition_revision: number;
878
+ expected_source_revision: number;
879
+ expected_target_revision: number;
880
+ target_record_id: string;
881
+ }
882
+
883
+ export interface RelationshipDefinitionListResponse {
884
+ relationships: Array<RelationshipDefinitionResponse>;
885
+ total: number;
886
+ }
887
+
888
+ export interface RelationshipDefinitionResponse {
889
+ api_slug: string;
890
+ created_at: string;
891
+ id: string;
892
+ is_archived: boolean;
893
+ revision: number;
894
+ source_kind: string;
895
+ source_label: string;
896
+ source_many: boolean;
897
+ source_object_definition_id: string | null;
898
+ target_kind: string;
899
+ target_label: string;
900
+ target_many: boolean;
901
+ target_object_definition_id: string | null;
902
+ }
903
+
904
+ export interface RelationshipResponse {
905
+ definition_id: string;
906
+ id: string;
907
+ source_kind: string;
908
+ source_record_id: string;
909
+ source_revision: number;
910
+ target_kind: string;
911
+ target_record_id: string;
912
+ target_revision: number;
913
+ }