@graph8/sdk 0.302.0 → 0.308.1

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.
@@ -2,7 +2,7 @@
2
2
 
3
3
  # `g8.api.objects`: Objects
4
4
 
5
- 18 operations (7 read, 8 write, 3 destructive).
5
+ 41 operations (13 read, 22 write, 6 destructive).
6
6
 
7
7
  18 of these also have a hand-written method (`g8.objects`), marked **★** below. Prefer the hand-written method when one exists: it unwraps the `data` envelope and takes friendlier arguments. See [../sdk-clients.md](../sdk-clients.md).
8
8
 
@@ -25,20 +25,43 @@ Exact TypeScript types for every operation on this page, and every schema they u
25
25
  | [`archiveAttribute`](#op-archiveattribute) ★ | `DELETE /api/v1/objects/{object_slug}/attributes/{attr_slug}` | destructive | `objects:manage` | Archive Attribute |
26
26
  | [`archiveObject`](#op-archiveobject) ★ | `DELETE /api/v1/objects/{object_slug}` | destructive | `objects:manage` | Archive Object |
27
27
  | [`archiveObjectRecord`](#op-archiveobjectrecord) ★ | `DELETE /api/v1/objects/{object_slug}/records/{record_id}` | destructive | `objects:delete` | Archive Object Record |
28
+ | [`bulkUpdateObjectRecords`](#op-bulkupdateobjectrecords) | `PATCH /api/v1/objects/{object_slug}/records/bulk` | write | `objects:write` | Bulk Update Object Records |
29
+ | [`commitObjectCsvImport`](#op-commitobjectcsvimport) | `POST /api/v1/objects/{object_slug}/imports/csv/drafts/{draft_id}/commit` | write | `objects:write` | Commit Object Csv Import |
28
30
  | [`createAttribute`](#op-createattribute) ★ | `POST /api/v1/objects/{object_slug}/attributes` | write | `objects:manage` | Create Attribute |
29
31
  | [`createObject`](#op-createobject) ★ | `POST /api/v1/objects` | write | `objects:manage` | Create Object |
32
+ | [`createObjectCsvImport`](#op-createobjectcsvimport) | `POST /api/v1/objects/{object_slug}/imports/csv/drafts` | write | `objects:write` | Create Object Csv Import |
30
33
  | [`createObjectRecord`](#op-createobjectrecord) ★ | `POST /api/v1/objects/{object_slug}/records` | write | `objects:write` | Create Object Record |
34
+ | [`createObjectRelationship`](#op-createobjectrelationship) | `POST /api/v1/objects/{object_slug}/records/{record_id}/relationships` | write | `objects:write` | Create Object Relationship |
35
+ | [`createObjectView`](#op-createobjectview) | `POST /api/v1/objects/{object_slug}/views` | write | `objects:write` | Create Object View |
36
+ | [`deleteObjectCsvImport`](#op-deleteobjectcsvimport) | `DELETE /api/v1/objects/{object_slug}/imports/csv/drafts/{draft_id}` | destructive | `objects:write` | Delete Object Csv Import |
37
+ | [`deleteObjectRelationship`](#op-deleteobjectrelationship) | `DELETE /api/v1/objects/{object_slug}/records/{record_id}/relationships/{relationship_id}` | destructive | `objects:write` | Delete Object Relationship |
38
+ | [`deleteObjectView`](#op-deleteobjectview) | `DELETE /api/v1/objects/{object_slug}/views/{view_id}` | destructive | `objects:delete` | Delete Object View |
39
+ | [`downloadObjectCsvImportErrors`](#op-downloadobjectcsvimporterrors) | `GET /api/v1/objects/{object_slug}/imports/csv/drafts/{draft_id}/errors` | read | `objects:write` | Download Object Csv Import Errors |
40
+ | [`exportObjectRecords`](#op-exportobjectrecords) | `POST /api/v1/objects/{object_slug}/exports` | write | `objects:export` | Export Object Records |
31
41
  | [`getObject`](#op-getobject) ★ | `GET /api/v1/objects/{object_slug}` | read | `objects:read` | Get Object |
42
+ | [`getObjectCsvImport`](#op-getobjectcsvimport) | `GET /api/v1/objects/{object_slug}/imports/csv/drafts/{draft_id}` | read | `objects:write` | Get Object Csv Import |
32
43
  | [`getObjectRecord`](#op-getobjectrecord) ★ | `GET /api/v1/objects/{object_slug}/records/{record_id}` | read | `objects:read` | Get Object Record |
33
44
  | [`getObjectRecordChanges`](#op-getobjectrecordchanges) ★ | `GET /api/v1/objects/{object_slug}/records/{record_id}/changes` | read | `objects:read` | Get Object Record Changes |
34
45
  | [`getObjectRecordHistory`](#op-getobjectrecordhistory) ★ | `GET /api/v1/objects/{object_slug}/records/{record_id}/history` | read | `objects:read` | Get Object Record History |
46
+ | [`getObjectRelationshipDefinitions`](#op-getobjectrelationshipdefinitions) | `GET /api/v1/objects/{object_slug}/relationships` | read | `objects:read` | Get Object Relationship Definitions |
47
+ | [`getObjectRelationships`](#op-getobjectrelationships) | `GET /api/v1/objects/{object_slug}/records/{record_id}/relationships` | read | `objects:read` | Get Object Relationships |
48
+ | [`inspectObjectCsvImport`](#op-inspectobjectcsvimport) | `POST /api/v1/objects/{object_slug}/imports/csv/inspect` | write | `objects:write` | Inspect Object Csv Import |
35
49
  | [`listObjectAttributes`](#op-listobjectattributes) ★ | `GET /api/v1/objects/{object_slug}/attributes` | read | `objects:read` | List Object Attributes |
50
+ | [`listObjectCsvImports`](#op-listobjectcsvimports) | `GET /api/v1/objects/{object_slug}/imports/csv/drafts` | read | `objects:write` | List Object Csv Imports |
36
51
  | [`listObjectRecords`](#op-listobjectrecords) ★ | `GET /api/v1/objects/{object_slug}/records` | read | `objects:read` | List Object Records |
52
+ | [`listObjectViews`](#op-listobjectviews) | `GET /api/v1/objects/{object_slug}/views` | read | `objects:read` | List Object Views |
37
53
  | [`listObjects`](#op-listobjects) ★ | `GET /api/v1/objects` | read | `objects:read` | List Objects |
54
+ | [`mergeObjectRecords`](#op-mergeobjectrecords) | `POST /api/v1/objects/{object_slug}/records/merge` | write | `objects:write` | Merge Object Records |
55
+ | [`previewObjectCsvImport`](#op-previewobjectcsvimport) | `POST /api/v1/objects/{object_slug}/imports/csv/drafts/{draft_id}/preview` | write | `objects:write` | Preview Object Csv Import |
56
+ | [`queryObjectBoardGroups`](#op-queryobjectboardgroups) | `POST /api/v1/objects/{object_slug}/views/board/groups` | write | `objects:read` | Query Object Board Groups |
57
+ | [`queryObjectBoardRecords`](#op-queryobjectboardrecords) | `POST /api/v1/objects/{object_slug}/views/board/records` | write | `objects:read` | Query Object Board Records |
38
58
  | [`restoreObjectRecord`](#op-restoreobjectrecord) ★ | `POST /api/v1/objects/{object_slug}/records/{record_id}/restore` | write | `objects:write` | Restore Object Record |
59
+ | [`setDefaultObjectView`](#op-setdefaultobjectview) | `PUT /api/v1/objects/{object_slug}/views/default` | write | `objects:write` | Set Default Object View |
39
60
  | [`updateAttribute`](#op-updateattribute) ★ | `PATCH /api/v1/objects/{object_slug}/attributes/{attr_slug}` | write | `objects:manage` | Update Attribute |
40
61
  | [`updateObject`](#op-updateobject) ★ | `PATCH /api/v1/objects/{object_slug}` | write | `objects:manage` | Update Object |
62
+ | [`updateObjectCsvImport`](#op-updateobjectcsvimport) | `PUT /api/v1/objects/{object_slug}/imports/csv/drafts/{draft_id}` | write | `objects:write` | Update Object Csv Import |
41
63
  | [`updateObjectRecord`](#op-updateobjectrecord) ★ | `PATCH /api/v1/objects/{object_slug}/records/{record_id}` | write | `objects:write` | Update Object Record |
64
+ | [`updateObjectView`](#op-updateobjectview) | `PUT /api/v1/objects/{object_slug}/views/{view_id}` | write | `objects:write` | Update Object View |
42
65
  | [`upsertObjectRecord`](#op-upsertobjectrecord) ★ | `POST /api/v1/objects/{object_slug}/records/upsert` | write | `objects:write` | Upsert Object Record |
43
66
 
44
67
  ---
@@ -85,6 +108,7 @@ Other envelope fields: `pagination` (PaginationMeta).
85
108
  | `is_system` | `boolean` | no | Whether this field is protected as a system attribute. default `false` |
86
109
  | `is_unique` | `boolean` | no | No two active records may hold the same value for this attribute. A collision is rejected with `409 duplicate_active_value`. default `false` |
87
110
  | `sort_order` | `integer` | no | Configured display order; equal values are ordered by API slug. default `0` |
111
+ | `visible_to_role_ids` | `Array<string> \| null` | no | Role ids that may see this field; null means every role. Owners and admins always see every field. A field hidden from the caller is absent from every response. Set it with PATCH on this attribute. |
88
112
 
89
113
  **Example**
90
114
 
@@ -196,6 +220,137 @@ const result = await g8.api.objects.archiveObjectRecord({ path: { object_slug: "
196
220
 
197
221
  ---
198
222
 
223
+ <a id="op-bulkupdateobjectrecords"></a>
224
+
225
+ ### `g8.api.objects.bulkUpdateObjectRecords(input)`
226
+
227
+ **Bulk Update Object Records**
228
+
229
+ - HTTP: `PATCH /api/v1/objects/{object_slug}/records/bulk`
230
+ - operationId: `bulk_update_object_records_objects__object_slug__records_bulk_patch` (also callable as `g8.api.call("bulk_update_object_records_objects__object_slug__records_bulk_patch", input)`)
231
+ - Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
232
+ - API-key scope: `objects:write`
233
+
234
+ Apply the same values to every record in an explicit or filtered scope.
235
+
236
+ Registered before ``/{object_slug}/records/{record_id}``: routes match by
237
+ path shape, so "bulk" would otherwise bind to ``{record_id}``. Needs
238
+ objects:read as well as objects:write (a filtered scope echoes the ids that
239
+ match caller-chosen predicates). Delegates to the Studio function, so the
240
+ server-side filter resolution, the 500-row cursor, the per-row savepoints
241
+ and the per-org ``records_core`` switch (404 while off) are identical.
242
+
243
+ **Input**
244
+
245
+ | Field | Type | Required | Description |
246
+ |---|---|---|---|
247
+ | `path.object_slug` | `string` | yes | |
248
+ | `body` | `RecordBulkUpdate` | yes | Request body; fields below. |
249
+
250
+ Body fields (`RecordBulkUpdate`):
251
+
252
+ | Field | Type | Required | Description |
253
+ |---|---|---|---|
254
+ | `body.after_record_id` | `string (uuid) \| null` | no | |
255
+ | `body.filters` | `Array<RecordFilter> \| null` | no | max items 10 |
256
+ | `body.record_ids` | `Array<string (uuid)> \| null` | no | max items 500 |
257
+ | `body.values` | `Record<string, unknown>` | no | |
258
+
259
+ **Returns** `ApiResponse_RecordBulkUpdateResponse_`: the envelope `{ data: RecordBulkUpdateResponse, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
260
+
261
+ Other envelope fields: `pagination` (PaginationMeta).
262
+
263
+ `RecordBulkUpdateResponse` fields:
264
+
265
+ | Field | Type | Required | Description |
266
+ |---|---|---|---|
267
+ | `failed` | `Array<RecordBulkUpdateFailure>` | yes | |
268
+ | `succeeded` | `Array<string (uuid)>` | yes | |
269
+ | `next_after_record_id` | `string (uuid) \| null` | no | |
270
+ | `truncated` | `boolean` | no | default `false` |
271
+
272
+ **Example**
273
+
274
+ ```ts
275
+ const result = await g8.api.objects.bulkUpdateObjectRecords({ path: { object_slug: "example" }, body: {} });
276
+ ```
277
+
278
+ ---
279
+
280
+ <a id="op-commitobjectcsvimport"></a>
281
+
282
+ ### `g8.api.objects.commitObjectCsvImport(input)`
283
+
284
+ **Commit Object Csv Import**
285
+
286
+ - HTTP: `POST /api/v1/objects/{object_slug}/imports/csv/drafts/{draft_id}/commit`
287
+ - operationId: `commit_object_csv_import_objects__object_slug__imports_csv_drafts__draft_id__commit_post` (also callable as `g8.api.call("commit_object_csv_import_objects__object_slug__imports_csv_drafts__draft_id__commit_post", input)`)
288
+ - Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
289
+ - API-key scope: `objects:write`
290
+
291
+ Commit one previewed page (at most 100 rows) in one transaction. Valid rows are imported; rows that do not validate
292
+ are skipped and listed in skipped_rows (download them from .../errors). Send the page's revision, offset, limit,
293
+ schema_fingerprint and every row's row_number, record_id and revision from the preview. created, updated and skipped
294
+ count this request; resending a committed page replays its receipts as already_imported and counts nothing twice. A
295
+ 409 is never fixed by resending the same body: preview the page again.
296
+
297
+ **Input**
298
+
299
+ | Field | Type | Required | Description |
300
+ |---|---|---|---|
301
+ | `path.object_slug` | `string` | yes | |
302
+ | `path.draft_id` | `string (uuid)` | yes | |
303
+ | `body` | `ObjectImportCommit` | yes | Request body; fields below. |
304
+
305
+ Body fields (`ObjectImportCommit`):
306
+
307
+ | Field | Type | Required | Description |
308
+ |---|---|---|---|
309
+ | `body.expected` | `Array<ImportRowExpectation>` | yes | min items 1, max items 100 |
310
+ | `body.revision` | `integer` | yes | The draft revision this page was planned against min 1 |
311
+ | `body.schema_fingerprint` | `string` | yes | pattern `^[a-f0-9]{64}$` |
312
+ | `body.limit` | `integer` | no | default `100`, min 1, max 100 |
313
+ | `body.offset` | `integer` | no | default `0`, min 0, max 4999 |
314
+
315
+ **Returns** `ApiResponse_ObjectCsvReceipt_`: the envelope `{ data: ObjectCsvReceipt, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
316
+
317
+ Other envelope fields: `pagination` (PaginationMeta).
318
+
319
+ `ObjectCsvReceipt` fields:
320
+
321
+ | Field | Type | Required | Description |
322
+ |---|---|---|---|
323
+ | `already_imported` | `integer` | yes | |
324
+ | `completed` | `integer` | yes | |
325
+ | `created` | `integer` | yes | |
326
+ | `error_file_available` | `boolean` | yes | |
327
+ | `error_rows` | `integer` | yes | |
328
+ | `rows` | `Array<ImportReceiptRow>` | yes | |
329
+ | `skipped` | `integer` | yes | |
330
+ | `status` | `"draft" \| "partial" \| "completed" \| "expired"` | yes | |
331
+ | `total` | `integer` | yes | |
332
+ | `updated` | `integer` | yes | |
333
+ | `replayed` | `boolean` | no | default `false` |
334
+ | `skipped_rows` | `Array<ImportSkippedRow>` | no | |
335
+
336
+ **Example**
337
+
338
+ ```ts
339
+ const result = await g8.api.objects.commitObjectCsvImport({
340
+ path: {
341
+ object_slug: "example",
342
+ draft_id: "00000000-0000-0000-0000-000000000000",
343
+ },
344
+ body: {
345
+ expected: [{ row_number: 2 }],
346
+ revision: 1,
347
+ schema_fingerprint: "example",
348
+ },
349
+ });
350
+ ```
351
+
352
+ ---
353
+
199
354
  <a id="op-createattribute"></a>
200
355
 
201
356
  ### `g8.api.objects.createAttribute(input)`
@@ -257,6 +412,7 @@ Other envelope fields: `pagination` (PaginationMeta).
257
412
  | `is_system` | `boolean` | no | Whether this field is protected as a system attribute. default `false` |
258
413
  | `is_unique` | `boolean` | no | No two active records may hold the same value for this attribute. A collision is rejected with `409 duplicate_active_value`. default `false` |
259
414
  | `sort_order` | `integer` | no | Configured display order; equal values are ordered by API slug. default `0` |
415
+ | `visible_to_role_ids` | `Array<string> \| null` | no | Role ids that may see this field; null means every role. Owners and admins always see every field. A field hidden from the caller is absent from every response. Set it with PATCH on this attribute. |
260
416
 
261
417
  **Example**
262
418
 
@@ -329,6 +485,73 @@ const result = await g8.api.objects.createObject({
329
485
 
330
486
  ---
331
487
 
488
+ <a id="op-createobjectcsvimport"></a>
489
+
490
+ ### `g8.api.objects.createObjectCsvImport(input)`
491
+
492
+ **Create Object Csv Import**
493
+
494
+ - HTTP: `POST /api/v1/objects/{object_slug}/imports/csv/drafts`
495
+ - operationId: `create_object_csv_import_objects__object_slug__imports_csv_drafts_post` (also callable as `g8.api.call("create_object_csv_import_objects__object_slug__imports_csv_drafts_post", input)`)
496
+ - Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
497
+ - API-key scope: `objects:write`
498
+
499
+ Upload a CSV once with its column mapping (header to field slug), mode create or upsert, and matching field for upsert.
500
+ The file is stored with the import for 30 days or until every row is imported. Writes no records.
501
+
502
+ **Input**
503
+
504
+ | Field | Type | Required | Description |
505
+ |---|---|---|---|
506
+ | `path.object_slug` | `string` | yes | |
507
+ | `body` | `ObjectImportCreate` | yes | Request body; fields below. |
508
+
509
+ Body fields (`ObjectImportCreate`):
510
+
511
+ | Field | Type | Required | Description |
512
+ |---|---|---|---|
513
+ | `body.csv` | `string` | yes | min length 1, max length 2000000 |
514
+ | `body.filename` | `string` | yes | min length 1, max length 255 |
515
+ | `body.mapping` | `Record<string, string>` | no | |
516
+ | `body.matching_attribute` | `string \| null` | no | max length 100 |
517
+ | `body.mode` | `"create" \| "upsert"` | no | default `"create"` |
518
+
519
+ **Returns** `ApiResponse_ObjectImportDetail_`: the envelope `{ data: ObjectImportDetail, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
520
+
521
+ Other envelope fields: `pagination` (PaginationMeta).
522
+
523
+ `ObjectImportDetail` fields:
524
+
525
+ | Field | Type | Required | Description |
526
+ |---|---|---|---|
527
+ | `completed` | `integer` | yes | |
528
+ | `created_at` | `string (date-time)` | yes | |
529
+ | `error_rows` | `integer` | yes | |
530
+ | `expires_at` | `string (date-time)` | yes | |
531
+ | `filename` | `string` | yes | |
532
+ | `headers` | `Array<string>` | yes | |
533
+ | `id` | `string (uuid)` | yes | |
534
+ | `owner_id` | `string` | yes | |
535
+ | `owner_type` | `"user" \| "api"` | yes | |
536
+ | `revision` | `integer` | yes | |
537
+ | `setup` | `ObjectImportSetup` | yes | |
538
+ | `source_available` | `boolean` | yes | |
539
+ | `status` | `"draft" \| "partial" \| "completed" \| "expired"` | yes | |
540
+ | `total` | `integer` | yes | |
541
+ | `updated_at` | `string (date-time)` | yes | |
542
+ | `sample` | `Array<Array<string>>` | no | First rows of the file while it is still stored |
543
+
544
+ **Example**
545
+
546
+ ```ts
547
+ const result = await g8.api.objects.createObjectCsvImport({
548
+ path: { object_slug: "example" },
549
+ body: { csv: "example", filename: "Example" },
550
+ });
551
+ ```
552
+
553
+ ---
554
+
332
555
  <a id="op-createobjectrecord"></a>
333
556
 
334
557
  ### `g8.api.objects.createObjectRecord(input)`
@@ -388,126 +611,183 @@ const result = await g8.api.objects.createObjectRecord({ path: { object_slug: "e
388
611
 
389
612
  ---
390
613
 
391
- <a id="op-getobject"></a>
392
-
393
- ### `g8.api.objects.getObject(input)`
614
+ <a id="op-createobjectrelationship"></a>
394
615
 
395
- **Get Object**
616
+ ### `g8.api.objects.createObjectRelationship(input)`
396
617
 
397
- - HTTP: `GET /api/v1/objects/{object_slug}`
398
- - operationId: `get_object_objects__object_slug__get` (also callable as `g8.api.call("get_object_objects__object_slug__get", input)`)
399
- - Tier: `read`: reads data; safe to call and to retry
400
- - API-key scope: `objects:read`
401
- - Lifecycle: `preview` (may not be enabled for every org yet)
402
- - ★ Hand-written: [`g8.objects.get()`](../sdk-clients.md#g8-objects-get)
618
+ **Create Object Relationship**
403
619
 
404
- PREVIEW. This endpoint is deployed but gated: it returns 404 unless the hosted app platform is enabled for your organization. It is published here so the contract describes the whole surface, not so it can be called today.
620
+ - HTTP: `POST /api/v1/objects/{object_slug}/records/{record_id}/relationships`
621
+ - operationId: `create_object_relationship_objects__object_slug__records__record_id__relationships_post` (also callable as `g8.api.call("create_object_relationship_objects__object_slug__records__record_id__relationships_post", input)`)
622
+ - Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
623
+ - API-key scope: `objects:write`
405
624
 
406
- Fetch one accessible registered standard or custom object type by its slug.
625
+ Link from a custom or canonical native record. The request's expected revisions are
626
+ relative to the route's record; the response is always in the definition's canonical
627
+ direction (source = the custom record, target = the native or custom target).
407
628
 
408
629
  **Input**
409
630
 
410
631
  | Field | Type | Required | Description |
411
632
  |---|---|---|---|
412
633
  | `path.object_slug` | `string` | yes | |
634
+ | `path.record_id` | `string` | yes | |
635
+ | `body` | `RelationshipCreate` | yes | Request body; fields below. |
413
636
 
414
- **Returns** `ApiResponse_ObjectDefinitionResponse_`: the envelope `{ data: ObjectDefinitionResponse, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
637
+ Body fields (`RelationshipCreate`):
638
+
639
+ | Field | Type | Required | Description |
640
+ |---|---|---|---|
641
+ | `body.definition_id` | `string (uuid)` | yes | |
642
+ | `body.expected_definition_revision` | `integer` | yes | > 0 |
643
+ | `body.expected_source_revision` | `integer` | yes | > 0 |
644
+ | `body.expected_target_revision` | `integer` | yes | > 0 |
645
+ | `body.target_record_id` | `string` | yes | min length 1, max length 255 |
646
+
647
+ **Returns** `ApiResponse_RelationshipResponse_`: the envelope `{ data: RelationshipResponse, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
415
648
 
416
649
  Other envelope fields: `pagination` (PaginationMeta).
417
650
 
418
- `ObjectDefinitionResponse` fields:
651
+ `RelationshipResponse` fields:
419
652
 
420
653
  | Field | Type | Required | Description |
421
654
  |---|---|---|---|
422
- | `plural_noun` | `string` | yes | Display name for many records, e.g. "Invoices". |
423
- | `singular_noun` | `string` | yes | Display name for one record, e.g. "Invoice". |
424
- | `slug` | `string` | yes | Stable API slug for the object type, e.g. `invoices`. |
425
- | `description` | `string \| null` | no | Customer-configured object description. |
426
- | `display_attribute_slug` | `string \| null` | no | Active single-value field used to label records; null uses the default. |
427
- | `icon` | `string \| null` | no | Configured graph8 icon name; null uses the default. |
428
- | `is_archived` | `boolean` | no | Archived objects are hidden from listings. default `false` |
429
- | `is_system` | `boolean` | no | True for objects graph8 ships; system objects cannot be deleted. default `false` |
655
+ | `definition_id` | `string (uuid)` | yes | |
656
+ | `id` | `string (uuid)` | yes | |
657
+ | `source_kind` | `string` | yes | |
658
+ | `source_record_id` | `string` | yes | |
659
+ | `source_revision` | `integer` | yes | |
660
+ | `target_kind` | `string` | yes | |
661
+ | `target_record_id` | `string` | yes | |
662
+ | `target_revision` | `integer` | yes | |
430
663
 
431
664
  **Example**
432
665
 
433
666
  ```ts
434
- const result = await g8.api.objects.getObject({ path: { object_slug: "example" } });
667
+ const result = await g8.api.objects.createObjectRelationship({
668
+ path: { object_slug: "example", record_id: "id" },
669
+ body: {
670
+ definition_id: "00000000-0000-0000-0000-000000000000",
671
+ expected_definition_revision: 1,
672
+ expected_source_revision: 1,
673
+ expected_target_revision: 1,
674
+ target_record_id: "id",
675
+ },
676
+ });
435
677
  ```
436
678
 
437
679
  ---
438
680
 
439
- <a id="op-getobjectrecord"></a>
440
-
441
- ### `g8.api.objects.getObjectRecord(input)`
442
-
443
- **Get Object Record**
681
+ <a id="op-createobjectview"></a>
444
682
 
445
- - HTTP: `GET /api/v1/objects/{object_slug}/records/{record_id}`
446
- - operationId: `get_object_record_objects__object_slug__records__record_id__get` (also callable as `g8.api.call("get_object_record_objects__object_slug__records__record_id__get", input)`)
447
- - Tier: `read`: reads data; safe to call and to retry
448
- - API-key scope: `objects:read`
449
- - Lifecycle: `preview` (may not be enabled for every org yet)
450
- - ★ Hand-written: [`g8.objects.getRecord()`](../sdk-clients.md#g8-objects-getrecord)
683
+ ### `g8.api.objects.createObjectView(input)`
451
684
 
452
- PREVIEW. This endpoint is deployed but gated: it returns 404 unless the hosted app platform is enabled for your organization. It is published here so the contract describes the whole surface, not so it can be called today.
685
+ **Create Object View**
453
686
 
454
- Fetch one record with its currently active values.
687
+ - HTTP: `POST /api/v1/objects/{object_slug}/views`
688
+ - operationId: `create_object_view_objects__object_slug__views_post` (also callable as `g8.api.call("create_object_view_objects__object_slug__views_post", input)`)
689
+ - Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
690
+ - API-key scope: `objects:write`
455
691
 
456
- Contacts and companies retain their canonical graph8 IDs; deals retain their
457
- canonical UUIDs. Deal values include active typed fields and permitted
458
- company, primary-contact and contact_ids references. Related-record access is checked
459
- independently of deal access. Generic deal mutations are not yet supported.
692
+ Save a private or shared view owned by this credential, without impersonating a human.
460
693
 
461
694
  **Input**
462
695
 
463
696
  | Field | Type | Required | Description |
464
697
  |---|---|---|---|
465
698
  | `path.object_slug` | `string` | yes | |
466
- | `path.record_id` | `string` | yes | |
699
+ | `body` | `ObjectViewCreate` | yes | Request body; fields below. |
467
700
 
468
- **Returns** `ApiResponse_ObjectRecordResponse_`: the envelope `{ data: ObjectRecordResponse, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
701
+ Body fields (`ObjectViewCreate`):
702
+
703
+ | Field | Type | Required | Description |
704
+ |---|---|---|---|
705
+ | `body.title` | `string` | yes | min length 1, max length 120 |
706
+ | `body.state` | `ObjectViewState` | no | |
707
+ | `body.visibility` | `Visibility` | no | default `"private"` |
708
+
709
+ **Returns** `ApiResponse_SavedViewResponse_`: the envelope `{ data: SavedViewResponse, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
469
710
 
470
711
  Other envelope fields: `pagination` (PaginationMeta).
471
712
 
472
- `ObjectRecordResponse` fields:
713
+ `SavedViewResponse` fields:
473
714
 
474
715
  | Field | Type | Required | Description |
475
716
  |---|---|---|---|
476
- | `id` | `string` | yes | Opaque record identifier. |
477
- | `object_slug` | `string` | yes | The object type this record belongs to. |
478
- | `created_at` | `string (date-time) \| null` | no | |
479
- | `is_archived` | `boolean` | no | Archived records are excluded from listings. default `false` |
480
- | `revision` | `integer` | no | Record revision for conditional updates. default `1`, min 1 |
481
- | `updated_at` | `string (date-time) \| null` | no | |
482
- | `values` | `Record<string, unknown>` | no | Currently active values, keyed by attribute slug. Shapes follow each attribute's own type; call `GET /objects/{object_slug}/attributes` for the schema. |
717
+ | `context_key` | `string \| null` | yes | |
718
+ | `created_at` | `string (date-time) \| null` | yes | |
719
+ | `created_by` | `string` | yes | |
720
+ | `description` | `string \| null` | yes | |
721
+ | `entity_type` | `EntityType` | yes | |
722
+ | `id` | `string (uuid)` | yes | |
723
+ | `is_default` | `boolean` | yes | |
724
+ | `is_owner` | `boolean` | yes | |
725
+ | `is_reusable` | `boolean` | yes | |
726
+ | `state` | `Record<string, unknown>` | yes | |
727
+ | `title` | `string` | yes | |
728
+ | `updated_at` | `string (date-time) \| null` | yes | |
729
+ | `visibility` | `Visibility` | yes | |
483
730
 
484
731
  **Example**
485
732
 
486
733
  ```ts
487
- const result = await g8.api.objects.getObjectRecord({ path: { object_slug: "example", record_id: "id" } });
734
+ const result = await g8.api.objects.createObjectView({ path: { object_slug: "example" }, body: { title: "Example" } });
488
735
  ```
489
736
 
490
737
  ---
491
738
 
492
- <a id="op-getobjectrecordchanges"></a>
739
+ <a id="op-deleteobjectcsvimport"></a>
493
740
 
494
- ### `g8.api.objects.getObjectRecordChanges(input)`
741
+ ### `g8.api.objects.deleteObjectCsvImport(input)`
495
742
 
496
- **Get Object Record Changes**
743
+ **Delete Object Csv Import**
497
744
 
498
- - HTTP: `GET /api/v1/objects/{object_slug}/records/{record_id}/changes`
499
- - operationId: `get_object_record_changes_objects__object_slug__records__record_id__changes_get` (also callable as `g8.api.call("get_object_record_changes_objects__object_slug__records__record_id__changes_get", input)`)
500
- - Tier: `read`: reads data; safe to call and to retry
501
- - API-key scope: `objects:read`
502
- - ★ Hand-written: [`g8.objects.changes()`](../sdk-clients.md#g8-objects-changes)
745
+ - HTTP: `DELETE /api/v1/objects/{object_slug}/imports/csv/drafts/{draft_id}`
746
+ - operationId: `delete_object_csv_import_objects__object_slug__imports_csv_drafts__draft_id__delete` (also callable as `g8.api.call("delete_object_csv_import_objects__object_slug__imports_csv_drafts__draft_id__delete", input)`)
747
+ - Tier: `destructive`: deletes or archives data; confirm with a human before calling
748
+ - API-key scope: `objects:write`
503
749
 
504
- Read recorded mutation authorship and before/after changes with stable cursor pagination.
750
+ Delete the stored file and setup. Records already imported, their history and import receipts are kept.
505
751
 
506
- Custom records include clear and lifecycle actions. Canonical contacts and companies use
507
- their existing IDs and audit facts, bounded by current record access and
508
- field privacy; archived records are unavailable through this reader.
509
- Older writes without recorded mutation facts are not reconstructed here.
510
- An unavailable audit store returns 503, never an empty success response.
752
+ **Input**
753
+
754
+ | Field | Type | Required | Description |
755
+ |---|---|---|---|
756
+ | `path.object_slug` | `string` | yes | |
757
+ | `path.draft_id` | `string (uuid)` | yes | |
758
+ | `query.revision` | `integer` | yes | |
759
+
760
+ **Returns** `ApiResponse_dict_`: the envelope `{ data: Record<string, unknown>, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
761
+
762
+ Other envelope fields: `pagination` (PaginationMeta).
763
+
764
+ **Example**
765
+
766
+ ```ts
767
+ // destructive: deletes or archives data; confirm with a human before calling.
768
+ const result = await g8.api.objects.deleteObjectCsvImport({
769
+ path: {
770
+ object_slug: "example",
771
+ draft_id: "00000000-0000-0000-0000-000000000000",
772
+ },
773
+ query: { revision: 1 },
774
+ });
775
+ ```
776
+
777
+ ---
778
+
779
+ <a id="op-deleteobjectrelationship"></a>
780
+
781
+ ### `g8.api.objects.deleteObjectRelationship(input)`
782
+
783
+ **Delete Object Relationship**
784
+
785
+ - HTTP: `DELETE /api/v1/objects/{object_slug}/records/{record_id}/relationships/{relationship_id}`
786
+ - operationId: `delete_object_relationship_objects__object_slug__records__record_id__relationships__relationship_id__delete` (also callable as `g8.api.call("delete_object_relationship_objects__object_slug__records__record_id__relationships__relationship_id__delete", input)`)
787
+ - Tier: `destructive`: deletes or archives data; confirm with a human before calling
788
+ - API-key scope: `objects:write`
789
+
790
+ Unlink only the edge; both records stay. All three revisions are required.
511
791
 
512
792
  **Input**
513
793
 
@@ -515,228 +795,1030 @@ An unavailable audit store returns 503, never an empty success response.
515
795
  |---|---|---|---|
516
796
  | `path.object_slug` | `string` | yes | |
517
797
  | `path.record_id` | `string` | yes | |
518
- | `query.limit` | `integer` | no | default `100` |
519
- | `query.cursor` | `string \| null` | no | |
798
+ | `path.relationship_id` | `string (uuid)` | yes | |
799
+ | `body` | `RelationshipCreate` | yes | Request body; fields below. |
520
800
 
521
- **Returns** `ApiResponse_RecordMutationsResponse_`: the envelope `{ data: RecordMutationsResponse, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
801
+ Body fields (`RelationshipCreate`):
802
+
803
+ | Field | Type | Required | Description |
804
+ |---|---|---|---|
805
+ | `body.definition_id` | `string (uuid)` | yes | |
806
+ | `body.expected_definition_revision` | `integer` | yes | > 0 |
807
+ | `body.expected_source_revision` | `integer` | yes | > 0 |
808
+ | `body.expected_target_revision` | `integer` | yes | > 0 |
809
+ | `body.target_record_id` | `string` | yes | min length 1, max length 255 |
810
+
811
+ **Returns** `ApiResponse_RelationshipResponse_`: the envelope `{ data: RelationshipResponse, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
522
812
 
523
813
  Other envelope fields: `pagination` (PaginationMeta).
524
814
 
525
- `RecordMutationsResponse` fields:
815
+ `RelationshipResponse` fields:
526
816
 
527
817
  | Field | Type | Required | Description |
528
818
  |---|---|---|---|
529
- | `entries` | `Array<RecordMutationEntry>` | yes | |
530
- | `record_id` | `string` | yes | |
531
- | `next_cursor` | `string \| null` | no | |
819
+ | `definition_id` | `string (uuid)` | yes | |
820
+ | `id` | `string (uuid)` | yes | |
821
+ | `source_kind` | `string` | yes | |
822
+ | `source_record_id` | `string` | yes | |
823
+ | `source_revision` | `integer` | yes | |
824
+ | `target_kind` | `string` | yes | |
825
+ | `target_record_id` | `string` | yes | |
826
+ | `target_revision` | `integer` | yes | |
532
827
 
533
828
  **Example**
534
829
 
535
830
  ```ts
536
- const result = await g8.api.objects.getObjectRecordChanges({ path: { object_slug: "example", record_id: "id" } });
831
+ // destructive: deletes or archives data; confirm with a human before calling.
832
+ const result = await g8.api.objects.deleteObjectRelationship({
833
+ path: {
834
+ object_slug: "example",
835
+ record_id: "id",
836
+ relationship_id: "00000000-0000-0000-0000-000000000000",
837
+ },
838
+ body: {
839
+ definition_id: "00000000-0000-0000-0000-000000000000",
840
+ expected_definition_revision: 1,
841
+ expected_source_revision: 1,
842
+ expected_target_revision: 1,
843
+ target_record_id: "id",
844
+ },
845
+ });
537
846
  ```
538
847
 
539
848
  ---
540
849
 
541
- <a id="op-getobjectrecordhistory"></a>
542
-
543
- ### `g8.api.objects.getObjectRecordHistory(input)`
544
-
545
- **Get Object Record History**
850
+ <a id="op-deleteobjectview"></a>
546
851
 
547
- - HTTP: `GET /api/v1/objects/{object_slug}/records/{record_id}/history`
548
- - operationId: `get_object_record_history_objects__object_slug__records__record_id__history_get` (also callable as `g8.api.call("get_object_record_history_objects__object_slug__records__record_id__history_get", input)`)
549
- - Tier: `read`: reads data; safe to call and to retry
550
- - API-key scope: `objects:read`
551
- - Lifecycle: `preview` (may not be enabled for every org yet)
552
- - ★ Hand-written: [`g8.objects.history()`](../sdk-clients.md#g8-objects-history)
852
+ ### `g8.api.objects.deleteObjectView(input)`
553
853
 
554
- PREVIEW. This endpoint is deployed but gated: it returns 404 unless the hosted app platform is enabled for your organization. It is published here so the contract describes the whole surface, not so it can be called today.
854
+ **Delete Object View**
555
855
 
556
- A record's value timeline, newest first.
856
+ - HTTP: `DELETE /api/v1/objects/{object_slug}/views/{view_id}`
857
+ - operationId: `delete_object_view_objects__object_slug__views__view_id__delete` (also callable as `g8.api.call("delete_object_view_objects__object_slug__views__view_id__delete", input)`)
858
+ - Tier: `destructive`: deletes or archives data; confirm with a human before calling
859
+ - API-key scope: `objects:delete`
557
860
 
558
- Each entry is one generation of one attribute. An entry whose `active_until`
559
- is null is the value currently in force.
861
+ Delete a view owned by this credential. Does not delete records.
560
862
 
561
863
  **Input**
562
864
 
563
865
  | Field | Type | Required | Description |
564
866
  |---|---|---|---|
565
867
  | `path.object_slug` | `string` | yes | |
566
- | `path.record_id` | `string` | yes | |
567
- | `query.limit` | `integer` | no | Maximum generations to return default `100` |
868
+ | `path.view_id` | `string (uuid)` | yes | |
568
869
 
569
- **Returns** `ApiResponse_RecordHistoryResponse_`: the envelope `{ data: RecordHistoryResponse, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
870
+ **Returns** `ApiResponse_NoneType_`: the envelope `{ data: null, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
570
871
 
571
872
  Other envelope fields: `pagination` (PaginationMeta).
572
873
 
573
- `RecordHistoryResponse` fields:
574
-
575
- | Field | Type | Required | Description |
576
- |---|---|---|---|
577
- | `record_id` | `string` | yes | |
578
- | `entries` | `Array<RecordHistoryEntry>` | no | |
579
-
580
874
  **Example**
581
875
 
582
876
  ```ts
583
- const result = await g8.api.objects.getObjectRecordHistory({ path: { object_slug: "example", record_id: "id" } });
877
+ // destructive: deletes or archives data; confirm with a human before calling.
878
+ const result = await g8.api.objects.deleteObjectView({
879
+ path: {
880
+ object_slug: "example",
881
+ view_id: "00000000-0000-0000-0000-000000000000",
882
+ },
883
+ });
584
884
  ```
585
885
 
586
886
  ---
587
887
 
588
- <a id="op-listobjectattributes"></a>
888
+ <a id="op-downloadobjectcsvimporterrors"></a>
589
889
 
590
- ### `g8.api.objects.listObjectAttributes(input)`
890
+ ### `g8.api.objects.downloadObjectCsvImportErrors(input)`
591
891
 
592
- **List Object Attributes**
892
+ **Download Object Csv Import Errors**
593
893
 
594
- - HTTP: `GET /api/v1/objects/{object_slug}/attributes`
595
- - operationId: `list_object_attributes_objects__object_slug__attributes_get` (also callable as `g8.api.call("list_object_attributes_objects__object_slug__attributes_get", input)`)
894
+ - HTTP: `GET /api/v1/objects/{object_slug}/imports/csv/drafts/{draft_id}/errors`
895
+ - operationId: `download_object_csv_import_errors_objects__object_slug__imports_csv_drafts__draft_id__errors_get` (also callable as `g8.api.call("download_object_csv_import_errors_objects__object_slug__imports_csv_drafts__draft_id__errors_get", input)`)
596
896
  - Tier: `read`: reads data; safe to call and to retry
597
- - API-key scope: `objects:read`
598
- - Lifecycle: `preview` (may not be enabled for every org yet)
599
- - ★ Hand-written: [`g8.objects.listAttributes()`](../sdk-clients.md#g8-objects-listattributes)
897
+ - API-key scope: `objects:write`
898
+
899
+ Download skipped and rejected rows as CSV. While the file is stored: the original columns plus row_number, column
900
+ and error, ready to fix and re-upload (cells are spreadsheet-safe). Afterwards: row_number, column and code only,
901
+ never values. Needs the same read grant as an export.
902
+
903
+ **Input**
904
+
905
+ | Field | Type | Required | Description |
906
+ |---|---|---|---|
907
+ | `path.object_slug` | `string` | yes | |
908
+ | `path.draft_id` | `string (uuid)` | yes | |
909
+
910
+ **Returns** `unknown`.
911
+
912
+ **Example**
913
+
914
+ ```ts
915
+ const result = await g8.api.objects.downloadObjectCsvImportErrors({
916
+ path: {
917
+ object_slug: "example",
918
+ draft_id: "00000000-0000-0000-0000-000000000000",
919
+ },
920
+ });
921
+ ```
922
+
923
+ ---
924
+
925
+ <a id="op-exportobjectrecords"></a>
926
+
927
+ ### `g8.api.objects.exportObjectRecords(input)`
928
+
929
+ **Export Object Records**
930
+
931
+ - HTTP: `POST /api/v1/objects/{object_slug}/exports`
932
+ - operationId: `export_object_records_objects__object_slug__exports_post` (also callable as `g8.api.call("export_object_records_objects__object_slug__exports_post", input)`)
933
+ - Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
934
+ - API-key scope: `objects:export`
935
+
936
+ Download every matching native custom record of a view (filters, search, sort, columns, archived scope) as CSV or
937
+ typed JSON. Explicit objects:read and objects:export scopes and the key's read grant are required and rechecked before
938
+ delivery. Maximum 256 MB and 120 seconds; no partial files. CSV is spreadsheet-safe. Not a workspace backup.
939
+
940
+ **Input**
941
+
942
+ | Field | Type | Required | Description |
943
+ |---|---|---|---|
944
+ | `path.object_slug` | `string` | yes | |
945
+ | `body` | `ObjectExportRequest` | yes | Request body; fields below. |
946
+
947
+ Body fields (`ObjectExportRequest`):
948
+
949
+ | Field | Type | Required | Description |
950
+ |---|---|---|---|
951
+ | `body.format` | `"csv" \| "json"` | no | default `"csv"` |
952
+ | `body.state` | `ObjectViewState` | no | |
953
+
954
+ **Returns** `string (binary)`.
955
+
956
+ **Example**
957
+
958
+ ```ts
959
+ const result = await g8.api.objects.exportObjectRecords({ path: { object_slug: "example" }, body: {} });
960
+ ```
961
+
962
+ ---
963
+
964
+ <a id="op-getobject"></a>
965
+
966
+ ### `g8.api.objects.getObject(input)`
967
+
968
+ **Get Object**
969
+
970
+ - HTTP: `GET /api/v1/objects/{object_slug}`
971
+ - operationId: `get_object_objects__object_slug__get` (also callable as `g8.api.call("get_object_objects__object_slug__get", input)`)
972
+ - Tier: `read`: reads data; safe to call and to retry
973
+ - API-key scope: `objects:read`
974
+ - Lifecycle: `preview` (may not be enabled for every org yet)
975
+ - ★ Hand-written: [`g8.objects.get()`](../sdk-clients.md#g8-objects-get)
976
+
977
+ PREVIEW. This endpoint is deployed but gated: it returns 404 unless the hosted app platform is enabled for your organization. It is published here so the contract describes the whole surface, not so it can be called today.
978
+
979
+ Fetch one accessible registered standard or custom object type by its slug.
980
+
981
+ **Input**
982
+
983
+ | Field | Type | Required | Description |
984
+ |---|---|---|---|
985
+ | `path.object_slug` | `string` | yes | |
986
+
987
+ **Returns** `ApiResponse_ObjectDefinitionResponse_`: the envelope `{ data: ObjectDefinitionResponse, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
988
+
989
+ Other envelope fields: `pagination` (PaginationMeta).
990
+
991
+ `ObjectDefinitionResponse` fields:
992
+
993
+ | Field | Type | Required | Description |
994
+ |---|---|---|---|
995
+ | `plural_noun` | `string` | yes | Display name for many records, e.g. "Invoices". |
996
+ | `singular_noun` | `string` | yes | Display name for one record, e.g. "Invoice". |
997
+ | `slug` | `string` | yes | Stable API slug for the object type, e.g. `invoices`. |
998
+ | `description` | `string \| null` | no | Customer-configured object description. |
999
+ | `display_attribute_slug` | `string \| null` | no | Active single-value field used to label records; null uses the default. |
1000
+ | `icon` | `string \| null` | no | Configured graph8 icon name; null uses the default. |
1001
+ | `is_archived` | `boolean` | no | Archived objects are hidden from listings. default `false` |
1002
+ | `is_system` | `boolean` | no | True for objects graph8 ships; system objects cannot be deleted. default `false` |
1003
+
1004
+ **Example**
1005
+
1006
+ ```ts
1007
+ const result = await g8.api.objects.getObject({ path: { object_slug: "example" } });
1008
+ ```
1009
+
1010
+ ---
1011
+
1012
+ <a id="op-getobjectcsvimport"></a>
1013
+
1014
+ ### `g8.api.objects.getObjectCsvImport(input)`
1015
+
1016
+ **Get Object Csv Import**
1017
+
1018
+ - HTTP: `GET /api/v1/objects/{object_slug}/imports/csv/drafts/{draft_id}`
1019
+ - operationId: `get_object_csv_import_objects__object_slug__imports_csv_drafts__draft_id__get` (also callable as `g8.api.call("get_object_csv_import_objects__object_slug__imports_csv_drafts__draft_id__get", input)`)
1020
+ - Tier: `read`: reads data; safe to call and to retry
1021
+ - API-key scope: `objects:write`
1022
+
1023
+ Read one of this credential's imports: setup, headers, progress, status and up to five sample rows while the file is stored.
1024
+
1025
+ **Input**
1026
+
1027
+ | Field | Type | Required | Description |
1028
+ |---|---|---|---|
1029
+ | `path.object_slug` | `string` | yes | |
1030
+ | `path.draft_id` | `string (uuid)` | yes | |
1031
+
1032
+ **Returns** `ApiResponse_ObjectImportDetail_`: the envelope `{ data: ObjectImportDetail, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1033
+
1034
+ Other envelope fields: `pagination` (PaginationMeta).
1035
+
1036
+ `ObjectImportDetail` fields:
1037
+
1038
+ | Field | Type | Required | Description |
1039
+ |---|---|---|---|
1040
+ | `completed` | `integer` | yes | |
1041
+ | `created_at` | `string (date-time)` | yes | |
1042
+ | `error_rows` | `integer` | yes | |
1043
+ | `expires_at` | `string (date-time)` | yes | |
1044
+ | `filename` | `string` | yes | |
1045
+ | `headers` | `Array<string>` | yes | |
1046
+ | `id` | `string (uuid)` | yes | |
1047
+ | `owner_id` | `string` | yes | |
1048
+ | `owner_type` | `"user" \| "api"` | yes | |
1049
+ | `revision` | `integer` | yes | |
1050
+ | `setup` | `ObjectImportSetup` | yes | |
1051
+ | `source_available` | `boolean` | yes | |
1052
+ | `status` | `"draft" \| "partial" \| "completed" \| "expired"` | yes | |
1053
+ | `total` | `integer` | yes | |
1054
+ | `updated_at` | `string (date-time)` | yes | |
1055
+ | `sample` | `Array<Array<string>>` | no | First rows of the file while it is still stored |
1056
+
1057
+ **Example**
1058
+
1059
+ ```ts
1060
+ const result = await g8.api.objects.getObjectCsvImport({
1061
+ path: {
1062
+ object_slug: "example",
1063
+ draft_id: "00000000-0000-0000-0000-000000000000",
1064
+ },
1065
+ });
1066
+ ```
1067
+
1068
+ ---
1069
+
1070
+ <a id="op-getobjectrecord"></a>
1071
+
1072
+ ### `g8.api.objects.getObjectRecord(input)`
1073
+
1074
+ **Get Object Record**
1075
+
1076
+ - HTTP: `GET /api/v1/objects/{object_slug}/records/{record_id}`
1077
+ - operationId: `get_object_record_objects__object_slug__records__record_id__get` (also callable as `g8.api.call("get_object_record_objects__object_slug__records__record_id__get", input)`)
1078
+ - Tier: `read`: reads data; safe to call and to retry
1079
+ - API-key scope: `objects:read`
1080
+ - Lifecycle: `preview` (may not be enabled for every org yet)
1081
+ - ★ Hand-written: [`g8.objects.getRecord()`](../sdk-clients.md#g8-objects-getrecord)
1082
+
1083
+ PREVIEW. This endpoint is deployed but gated: it returns 404 unless the hosted app platform is enabled for your organization. It is published here so the contract describes the whole surface, not so it can be called today.
1084
+
1085
+ Fetch one record with its currently active values.
1086
+
1087
+ Contacts and companies retain their canonical graph8 IDs; deals retain their
1088
+ canonical UUIDs. Deal values include active typed fields and permitted
1089
+ company, primary-contact and contact_ids references. Related-record access is checked
1090
+ independently of deal access. Generic deal mutations are not yet supported.
1091
+
1092
+ **Input**
1093
+
1094
+ | Field | Type | Required | Description |
1095
+ |---|---|---|---|
1096
+ | `path.object_slug` | `string` | yes | |
1097
+ | `path.record_id` | `string` | yes | |
1098
+
1099
+ **Returns** `ApiResponse_ObjectRecordResponse_`: the envelope `{ data: ObjectRecordResponse, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1100
+
1101
+ Other envelope fields: `pagination` (PaginationMeta).
1102
+
1103
+ `ObjectRecordResponse` fields:
1104
+
1105
+ | Field | Type | Required | Description |
1106
+ |---|---|---|---|
1107
+ | `id` | `string` | yes | Opaque record identifier. |
1108
+ | `object_slug` | `string` | yes | The object type this record belongs to. |
1109
+ | `created_at` | `string (date-time) \| null` | no | |
1110
+ | `is_archived` | `boolean` | no | Archived records are excluded from listings. default `false` |
1111
+ | `revision` | `integer` | no | Record revision for conditional updates. default `1`, min 1 |
1112
+ | `updated_at` | `string (date-time) \| null` | no | |
1113
+ | `values` | `Record<string, unknown>` | no | Currently active values, keyed by attribute slug. Shapes follow each attribute's own type; call `GET /objects/{object_slug}/attributes` for the schema. |
1114
+
1115
+ **Example**
1116
+
1117
+ ```ts
1118
+ const result = await g8.api.objects.getObjectRecord({ path: { object_slug: "example", record_id: "id" } });
1119
+ ```
1120
+
1121
+ ---
1122
+
1123
+ <a id="op-getobjectrecordchanges"></a>
1124
+
1125
+ ### `g8.api.objects.getObjectRecordChanges(input)`
1126
+
1127
+ **Get Object Record Changes**
1128
+
1129
+ - HTTP: `GET /api/v1/objects/{object_slug}/records/{record_id}/changes`
1130
+ - operationId: `get_object_record_changes_objects__object_slug__records__record_id__changes_get` (also callable as `g8.api.call("get_object_record_changes_objects__object_slug__records__record_id__changes_get", input)`)
1131
+ - Tier: `read`: reads data; safe to call and to retry
1132
+ - API-key scope: `objects:read`
1133
+ - ★ Hand-written: [`g8.objects.changes()`](../sdk-clients.md#g8-objects-changes)
1134
+
1135
+ Read recorded mutation authorship and before/after changes with stable cursor pagination.
1136
+
1137
+ Custom records include clear and lifecycle actions. Canonical contacts and companies use
1138
+ their existing IDs and audit facts, bounded by current record access and
1139
+ field privacy; archived records are unavailable through this reader.
1140
+ Older writes without recorded mutation facts are not reconstructed here.
1141
+ An unavailable audit store returns 503, never an empty success response.
1142
+
1143
+ **Input**
1144
+
1145
+ | Field | Type | Required | Description |
1146
+ |---|---|---|---|
1147
+ | `path.object_slug` | `string` | yes | |
1148
+ | `path.record_id` | `string` | yes | |
1149
+ | `query.limit` | `integer` | no | default `100` |
1150
+ | `query.cursor` | `string \| null` | no | |
1151
+
1152
+ **Returns** `ApiResponse_RecordMutationsResponse_`: the envelope `{ data: RecordMutationsResponse, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1153
+
1154
+ Other envelope fields: `pagination` (PaginationMeta).
1155
+
1156
+ `RecordMutationsResponse` fields:
1157
+
1158
+ | Field | Type | Required | Description |
1159
+ |---|---|---|---|
1160
+ | `entries` | `Array<RecordMutationEntry>` | yes | |
1161
+ | `record_id` | `string` | yes | |
1162
+ | `next_cursor` | `string \| null` | no | |
1163
+
1164
+ **Example**
1165
+
1166
+ ```ts
1167
+ const result = await g8.api.objects.getObjectRecordChanges({ path: { object_slug: "example", record_id: "id" } });
1168
+ ```
1169
+
1170
+ ---
1171
+
1172
+ <a id="op-getobjectrecordhistory"></a>
1173
+
1174
+ ### `g8.api.objects.getObjectRecordHistory(input)`
1175
+
1176
+ **Get Object Record History**
1177
+
1178
+ - HTTP: `GET /api/v1/objects/{object_slug}/records/{record_id}/history`
1179
+ - operationId: `get_object_record_history_objects__object_slug__records__record_id__history_get` (also callable as `g8.api.call("get_object_record_history_objects__object_slug__records__record_id__history_get", input)`)
1180
+ - Tier: `read`: reads data; safe to call and to retry
1181
+ - API-key scope: `objects:read`
1182
+ - Lifecycle: `preview` (may not be enabled for every org yet)
1183
+ - ★ Hand-written: [`g8.objects.history()`](../sdk-clients.md#g8-objects-history)
1184
+
1185
+ PREVIEW. This endpoint is deployed but gated: it returns 404 unless the hosted app platform is enabled for your organization. It is published here so the contract describes the whole surface, not so it can be called today.
1186
+
1187
+ A record's value timeline, newest first.
1188
+
1189
+ Each entry is one generation of one attribute. An entry whose `active_until`
1190
+ is null is the value currently in force.
1191
+
1192
+ **Input**
1193
+
1194
+ | Field | Type | Required | Description |
1195
+ |---|---|---|---|
1196
+ | `path.object_slug` | `string` | yes | |
1197
+ | `path.record_id` | `string` | yes | |
1198
+ | `query.limit` | `integer` | no | Maximum generations to return default `100` |
1199
+
1200
+ **Returns** `ApiResponse_RecordHistoryResponse_`: the envelope `{ data: RecordHistoryResponse, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1201
+
1202
+ Other envelope fields: `pagination` (PaginationMeta).
1203
+
1204
+ `RecordHistoryResponse` fields:
1205
+
1206
+ | Field | Type | Required | Description |
1207
+ |---|---|---|---|
1208
+ | `record_id` | `string` | yes | |
1209
+ | `entries` | `Array<RecordHistoryEntry>` | no | |
1210
+
1211
+ **Example**
1212
+
1213
+ ```ts
1214
+ const result = await g8.api.objects.getObjectRecordHistory({ path: { object_slug: "example", record_id: "id" } });
1215
+ ```
1216
+
1217
+ ---
1218
+
1219
+ <a id="op-getobjectrelationshipdefinitions"></a>
1220
+
1221
+ ### `g8.api.objects.getObjectRelationshipDefinitions(input)`
1222
+
1223
+ **Get Object Relationship Definitions**
1224
+
1225
+ - HTTP: `GET /api/v1/objects/{object_slug}/relationships`
1226
+ - operationId: `get_object_relationship_definitions_objects__object_slug__relationships_get` (also callable as `g8.api.call("get_object_relationship_definitions_objects__object_slug__relationships_get", input)`)
1227
+ - Tier: `read`: reads data; safe to call and to retry
1228
+ - API-key scope: `objects:read`
1229
+
1230
+ Definitions involving a custom or native object, narrowed to the credential's native read scopes.
1231
+
1232
+ **Input**
1233
+
1234
+ | Field | Type | Required | Description |
1235
+ |---|---|---|---|
1236
+ | `path.object_slug` | `string` | yes | |
1237
+ | `query.limit` | `integer` | no | default `50` |
1238
+ | `query.offset` | `integer` | no | default `0` |
1239
+
1240
+ **Returns** `ApiResponse_RelationshipDefinitionListResponse_`: the envelope `{ data: RelationshipDefinitionListResponse, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1241
+
1242
+ Other envelope fields: `pagination` (PaginationMeta).
1243
+
1244
+ `RelationshipDefinitionListResponse` fields:
1245
+
1246
+ | Field | Type | Required | Description |
1247
+ |---|---|---|---|
1248
+ | `relationships` | `Array<RelationshipDefinitionResponse>` | yes | |
1249
+ | `total` | `integer` | yes | |
1250
+
1251
+ **Example**
1252
+
1253
+ ```ts
1254
+ const result = await g8.api.objects.getObjectRelationshipDefinitions({ path: { object_slug: "example" } });
1255
+ ```
1256
+
1257
+ ---
1258
+
1259
+ <a id="op-getobjectrelationships"></a>
1260
+
1261
+ ### `g8.api.objects.getObjectRelationships(input)`
1262
+
1263
+ **Get Object Relationships**
1264
+
1265
+ - HTTP: `GET /api/v1/objects/{object_slug}/records/{record_id}/relationships`
1266
+ - operationId: `get_object_relationships_objects__object_slug__records__record_id__relationships_get` (also callable as `g8.api.call("get_object_relationships_objects__object_slug__records__record_id__relationships_get", input)`)
1267
+ - Tier: `read`: reads data; safe to call and to retry
1268
+ - API-key scope: `objects:read`
1269
+
1270
+ Read authorized links of a custom or native record, both endpoints filtered
1271
+ before pagination. Needs objects:read plus the native kinds' explicit read
1272
+ scopes; an absent and an inaccessible record share a neutral 404.
1273
+
1274
+ **Input**
1275
+
1276
+ | Field | Type | Required | Description |
1277
+ |---|---|---|---|
1278
+ | `path.object_slug` | `string` | yes | |
1279
+ | `path.record_id` | `string` | yes | |
1280
+ | `query.limit` | `integer` | no | default `50` |
1281
+ | `query.offset` | `integer` | no | default `0` |
1282
+
1283
+ **Returns** `ApiResponse_RecordRelationshipsResponse_`: the envelope `{ data: RecordRelationshipsResponse, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1284
+
1285
+ Other envelope fields: `pagination` (PaginationMeta).
1286
+
1287
+ `RecordRelationshipsResponse` fields:
1288
+
1289
+ | Field | Type | Required | Description |
1290
+ |---|---|---|---|
1291
+ | `next_offset` | `integer \| null` | yes | Next visible page offset; null at the end |
1292
+ | `relationships` | `Array<RelatedRecordEdge>` | yes | |
1293
+
1294
+ **Example**
1295
+
1296
+ ```ts
1297
+ const result = await g8.api.objects.getObjectRelationships({ path: { object_slug: "example", record_id: "id" } });
1298
+ ```
1299
+
1300
+ ---
1301
+
1302
+ <a id="op-inspectobjectcsvimport"></a>
1303
+
1304
+ ### `g8.api.objects.inspectObjectCsvImport(input)`
1305
+
1306
+ **Inspect Object Csv Import**
1307
+
1308
+ - HTTP: `POST /api/v1/objects/{object_slug}/imports/csv/inspect`
1309
+ - operationId: `inspect_object_csv_import_objects__object_slug__imports_csv_inspect_post` (also callable as `g8.api.call("inspect_object_csv_import_objects__object_slug__imports_csv_inspect_post", input)`)
1310
+ - Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
1311
+ - API-key scope: `objects:write`
1312
+
1313
+ Read a CSV's headers, five sample rows and row count. Nothing is stored or written. Maximum 2 MB, 5000 rows, 200 columns.
1314
+
1315
+ **Input**
1316
+
1317
+ | Field | Type | Required | Description |
1318
+ |---|---|---|---|
1319
+ | `path.object_slug` | `string` | yes | |
1320
+ | `body` | `ObjectCsvInspect` | yes | Request body; fields below. |
1321
+
1322
+ Body fields (`ObjectCsvInspect`):
1323
+
1324
+ | Field | Type | Required | Description |
1325
+ |---|---|---|---|
1326
+ | `body.csv` | `string` | yes | min length 1, max length 2000000 |
1327
+
1328
+ **Returns** `ApiResponse_ObjectCsvInspection_`: the envelope `{ data: ObjectCsvInspection, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1329
+
1330
+ Other envelope fields: `pagination` (PaginationMeta).
1331
+
1332
+ `ObjectCsvInspection` fields:
1333
+
1334
+ | Field | Type | Required | Description |
1335
+ |---|---|---|---|
1336
+ | `headers` | `Array<string>` | yes | |
1337
+ | `sample` | `Array<Array<string>>` | yes | |
1338
+ | `total` | `integer` | yes | |
1339
+
1340
+ **Example**
1341
+
1342
+ ```ts
1343
+ const result = await g8.api.objects.inspectObjectCsvImport({ path: { object_slug: "example" }, body: { csv: "example" } });
1344
+ ```
1345
+
1346
+ ---
1347
+
1348
+ <a id="op-listobjectattributes"></a>
1349
+
1350
+ ### `g8.api.objects.listObjectAttributes(input)`
1351
+
1352
+ **List Object Attributes**
1353
+
1354
+ - HTTP: `GET /api/v1/objects/{object_slug}/attributes`
1355
+ - operationId: `list_object_attributes_objects__object_slug__attributes_get` (also callable as `g8.api.call("list_object_attributes_objects__object_slug__attributes_get", input)`)
1356
+ - Tier: `read`: reads data; safe to call and to retry
1357
+ - API-key scope: `objects:read`
1358
+ - Lifecycle: `preview` (may not be enabled for every org yet)
1359
+ - ★ Hand-written: [`g8.objects.listAttributes()`](../sdk-clients.md#g8-objects-listattributes)
1360
+
1361
+ PREVIEW. This endpoint is deployed but gated: it returns 404 unless the hosted app platform is enabled for your organization. It is published here so the contract describes the whole surface, not so it can be called today.
1362
+
1363
+ List active fields. Archived-field discovery currently applies to custom objects.
1364
+
1365
+ **Input**
1366
+
1367
+ | Field | Type | Required | Description |
1368
+ |---|---|---|---|
1369
+ | `path.object_slug` | `string` | yes | |
1370
+ | `query.include_archived` | `boolean` | no | default `false` |
1371
+
1372
+ **Returns** `ApiResponse_list_AttributeDefinitionResponse__`: the envelope `{ data: Array<AttributeDefinitionResponse>, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1373
+
1374
+ Other envelope fields: `pagination` (PaginationMeta).
1375
+
1376
+ `AttributeDefinitionResponse` fields:
1377
+
1378
+ | Field | Type | Required | Description |
1379
+ |---|---|---|---|
1380
+ | `attribute_type` | `string` | yes | One of the 16 supported attribute types (`text`, `number`, `email_address`, `timestamp`, `select`, `record_reference`, …). Determines how values are validated and canonicalized. |
1381
+ | `slug` | `string` | yes | Stable API slug for the attribute, used as a payload key. |
1382
+ | `title` | `string` | yes | Customer-facing field label, distinct from its stable API slug. |
1383
+ | `config` | `Record<string, unknown>` | no | Type-specific configuration, e.g. select options. Record references require target_object and must resolve to active records in that object within the caller's organization and app. |
1384
+ | `default_value` | `unknown` | no | Configured create default. Enabled non-null defaults pass the same validation as explicit values. |
1385
+ | `description` | `string \| null` | no | Customer-configured description of the field. |
1386
+ | `is_archived` | `boolean` | no | Archived fields retain their values and can be restored. default `false` |
1387
+ | `is_default_value_enabled` | `boolean` | no | Apply the configured default when this field is omitted on create. Never applies on PATCH. default `false` |
1388
+ | `is_multiselect` | `boolean` | no | Values are a list rather than a scalar. default `false` |
1389
+ | `is_required` | `boolean` | no | Required on create. PATCH may omit it, but cannot clear it with null or an empty multivalue list. default `false` |
1390
+ | `is_system` | `boolean` | no | Whether this field is protected as a system attribute. default `false` |
1391
+ | `is_unique` | `boolean` | no | No two active records may hold the same value for this attribute. A collision is rejected with `409 duplicate_active_value`. default `false` |
1392
+ | `sort_order` | `integer` | no | Configured display order; equal values are ordered by API slug. default `0` |
1393
+ | `visible_to_role_ids` | `Array<string> \| null` | no | Role ids that may see this field; null means every role. Owners and admins always see every field. A field hidden from the caller is absent from every response. Set it with PATCH on this attribute. |
1394
+
1395
+ **Example**
1396
+
1397
+ ```ts
1398
+ const result = await g8.api.objects.listObjectAttributes({ path: { object_slug: "example" } });
1399
+ ```
1400
+
1401
+ ---
1402
+
1403
+ <a id="op-listobjectcsvimports"></a>
1404
+
1405
+ ### `g8.api.objects.listObjectCsvImports(input)`
1406
+
1407
+ **List Object Csv Imports**
1408
+
1409
+ - HTTP: `GET /api/v1/objects/{object_slug}/imports/csv/drafts`
1410
+ - operationId: `list_object_csv_imports_objects__object_slug__imports_csv_drafts_get` (also callable as `g8.api.call("list_object_csv_imports_objects__object_slug__imports_csv_drafts_get", input)`)
1411
+ - Tier: `read`: reads data; safe to call and to retry
1412
+ - API-key scope: `objects:write`
1413
+
1414
+ List this credential's CSV imports for the object, newest first. History only: no file contents or cell values.
1415
+
1416
+ **Input**
1417
+
1418
+ | Field | Type | Required | Description |
1419
+ |---|---|---|---|
1420
+ | `path.object_slug` | `string` | yes | |
1421
+ | `query.limit` | `integer` | no | default `25` |
1422
+ | `query.offset` | `integer` | no | default `0` |
1423
+
1424
+ **Returns** `ApiResponse_list_ObjectImportSummary__`: the envelope `{ data: Array<ObjectImportSummary>, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1425
+
1426
+ Other envelope fields: `pagination` (PaginationMeta).
1427
+
1428
+ `ObjectImportSummary` fields:
1429
+
1430
+ | Field | Type | Required | Description |
1431
+ |---|---|---|---|
1432
+ | `completed` | `integer` | yes | |
1433
+ | `created_at` | `string (date-time)` | yes | |
1434
+ | `error_rows` | `integer` | yes | |
1435
+ | `expires_at` | `string (date-time)` | yes | |
1436
+ | `filename` | `string` | yes | |
1437
+ | `id` | `string (uuid)` | yes | |
1438
+ | `owner_id` | `string` | yes | |
1439
+ | `owner_type` | `"user" \| "api"` | yes | |
1440
+ | `revision` | `integer` | yes | |
1441
+ | `source_available` | `boolean` | yes | |
1442
+ | `status` | `"draft" \| "partial" \| "completed" \| "expired"` | yes | |
1443
+ | `total` | `integer` | yes | |
1444
+ | `updated_at` | `string (date-time)` | yes | |
1445
+
1446
+ **Example**
1447
+
1448
+ ```ts
1449
+ const result = await g8.api.objects.listObjectCsvImports({ path: { object_slug: "example" } });
1450
+ ```
1451
+
1452
+ ---
1453
+
1454
+ <a id="op-listobjectrecords"></a>
1455
+
1456
+ ### `g8.api.objects.listObjectRecords(input)`
1457
+
1458
+ **List Object Records**
1459
+
1460
+ - HTTP: `GET /api/v1/objects/{object_slug}/records`
1461
+ - operationId: `list_object_records_objects__object_slug__records_get` (also callable as `g8.api.call("list_object_records_objects__object_slug__records_get", input)`)
1462
+ - Tier: `read`: reads data; safe to call and to retry
1463
+ - API-key scope: `objects:read`
1464
+ - Lifecycle: `preview` (may not be enabled for every org yet)
1465
+ - ★ Hand-written: [`g8.objects.listRecords()`](../sdk-clients.md#g8-objects-listrecords)
1466
+
1467
+ PREVIEW. This endpoint is deployed but gated: it returns 404 unless the hosted app platform is enabled for your organization. It is published here so the contract describes the whole surface, not so it can be called today.
1468
+
1469
+ List an object's records, newest last, with their active values.
1470
+
1471
+ Archived records are excluded. Supports page-number and opaque cursor
1472
+ pagination; when `cursor` is supplied it wins. Deals use canonical UUIDs,
1473
+ current ownership scope, typed values and independently permitted references.
1474
+
1475
+ **Input**
1476
+
1477
+ | Field | Type | Required | Description |
1478
+ |---|---|---|---|
1479
+ | `path.object_slug` | `string` | yes | |
1480
+ | `query.page` | `integer` | no | Page number (ignored when `cursor` is supplied) default `1` |
1481
+ | `query.limit` | `integer` | no | Items per page default `50` |
1482
+ | `query.cursor` | `string \| null` | no | Opaque pagination cursor from a prior response's `next_cursor`. When supplied it takes precedence over `page`. |
1483
+
1484
+ **Returns** `ApiResponse_list_ObjectRecordResponse__`: the envelope `{ data: Array<ObjectRecordResponse>, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1485
+
1486
+ Other envelope fields: `pagination` (PaginationMeta).
1487
+
1488
+ `ObjectRecordResponse` fields:
1489
+
1490
+ | Field | Type | Required | Description |
1491
+ |---|---|---|---|
1492
+ | `id` | `string` | yes | Opaque record identifier. |
1493
+ | `object_slug` | `string` | yes | The object type this record belongs to. |
1494
+ | `created_at` | `string (date-time) \| null` | no | |
1495
+ | `is_archived` | `boolean` | no | Archived records are excluded from listings. default `false` |
1496
+ | `revision` | `integer` | no | Record revision for conditional updates. default `1`, min 1 |
1497
+ | `updated_at` | `string (date-time) \| null` | no | |
1498
+ | `values` | `Record<string, unknown>` | no | Currently active values, keyed by attribute slug. Shapes follow each attribute's own type; call `GET /objects/{object_slug}/attributes` for the schema. |
1499
+
1500
+ **Example**
1501
+
1502
+ ```ts
1503
+ const result = await g8.api.objects.listObjectRecords({ path: { object_slug: "example" } });
1504
+ ```
1505
+
1506
+ ---
1507
+
1508
+ <a id="op-listobjectviews"></a>
1509
+
1510
+ ### `g8.api.objects.listObjectViews(input)`
1511
+
1512
+ **List Object Views**
1513
+
1514
+ - HTTP: `GET /api/v1/objects/{object_slug}/views`
1515
+ - operationId: `list_object_views_objects__object_slug__views_get` (also callable as `g8.api.call("list_object_views_objects__object_slug__views_get", input)`)
1516
+ - Tier: `read`: reads data; safe to call and to retry
1517
+ - API-key scope: `objects:read`
1518
+
1519
+ List this credential's private views and shared workspace views. Views never grant record access.
1520
+
1521
+ **Input**
1522
+
1523
+ | Field | Type | Required | Description |
1524
+ |---|---|---|---|
1525
+ | `path.object_slug` | `string` | yes | |
1526
+
1527
+ **Returns** `ApiResponse_list_SavedViewResponse__`: the envelope `{ data: Array<SavedViewResponse>, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1528
+
1529
+ Other envelope fields: `pagination` (PaginationMeta).
1530
+
1531
+ `SavedViewResponse` fields:
1532
+
1533
+ | Field | Type | Required | Description |
1534
+ |---|---|---|---|
1535
+ | `context_key` | `string \| null` | yes | |
1536
+ | `created_at` | `string (date-time) \| null` | yes | |
1537
+ | `created_by` | `string` | yes | |
1538
+ | `description` | `string \| null` | yes | |
1539
+ | `entity_type` | `EntityType` | yes | |
1540
+ | `id` | `string (uuid)` | yes | |
1541
+ | `is_default` | `boolean` | yes | |
1542
+ | `is_owner` | `boolean` | yes | |
1543
+ | `is_reusable` | `boolean` | yes | |
1544
+ | `state` | `Record<string, unknown>` | yes | |
1545
+ | `title` | `string` | yes | |
1546
+ | `updated_at` | `string (date-time) \| null` | yes | |
1547
+ | `visibility` | `Visibility` | yes | |
1548
+
1549
+ **Example**
1550
+
1551
+ ```ts
1552
+ const result = await g8.api.objects.listObjectViews({ path: { object_slug: "example" } });
1553
+ ```
1554
+
1555
+ ---
1556
+
1557
+ <a id="op-listobjects"></a>
1558
+
1559
+ ### `g8.api.objects.listObjects(input?)`
1560
+
1561
+ **List Objects**
1562
+
1563
+ - HTTP: `GET /api/v1/objects`
1564
+ - operationId: `list_objects_objects_get` (also callable as `g8.api.call("list_objects_objects_get", input)`)
1565
+ - Tier: `read`: reads data; safe to call and to retry
1566
+ - API-key scope: `objects:read`
1567
+ - Lifecycle: `preview` (may not be enabled for every org yet)
1568
+ - ★ Hand-written: [`g8.objects.list()`](../sdk-clients.md#g8-objects-list)
1569
+
1570
+ PREVIEW. This endpoint is deployed but gated: it returns 404 unless the hosted app platform is enabled for your organization. It is published here so the contract describes the whole surface, not so it can be called today.
1571
+
1572
+ List accessible registered standard and custom objects; optionally include archived custom definitions.
1573
+
1574
+ **Input**
1575
+
1576
+ | Field | Type | Required | Description |
1577
+ |---|---|---|---|
1578
+ | `query.include_archived` | `boolean` | no | default `false` |
1579
+
1580
+ **Returns** `ApiResponse_list_ObjectDefinitionResponse__`: the envelope `{ data: Array<ObjectDefinitionResponse>, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1581
+
1582
+ Other envelope fields: `pagination` (PaginationMeta).
1583
+
1584
+ `ObjectDefinitionResponse` fields:
1585
+
1586
+ | Field | Type | Required | Description |
1587
+ |---|---|---|---|
1588
+ | `plural_noun` | `string` | yes | Display name for many records, e.g. "Invoices". |
1589
+ | `singular_noun` | `string` | yes | Display name for one record, e.g. "Invoice". |
1590
+ | `slug` | `string` | yes | Stable API slug for the object type, e.g. `invoices`. |
1591
+ | `description` | `string \| null` | no | Customer-configured object description. |
1592
+ | `display_attribute_slug` | `string \| null` | no | Active single-value field used to label records; null uses the default. |
1593
+ | `icon` | `string \| null` | no | Configured graph8 icon name; null uses the default. |
1594
+ | `is_archived` | `boolean` | no | Archived objects are hidden from listings. default `false` |
1595
+ | `is_system` | `boolean` | no | True for objects graph8 ships; system objects cannot be deleted. default `false` |
1596
+
1597
+ **Example**
1598
+
1599
+ ```ts
1600
+ const result = await g8.api.objects.listObjects();
1601
+ ```
1602
+
1603
+ ---
1604
+
1605
+ <a id="op-mergeobjectrecords"></a>
1606
+
1607
+ ### `g8.api.objects.mergeObjectRecords(input)`
1608
+
1609
+ **Merge Object Records**
1610
+
1611
+ - HTTP: `POST /api/v1/objects/{object_slug}/records/merge`
1612
+ - operationId: `merge_object_records_objects__object_slug__records_merge_post` (also callable as `g8.api.call("merge_object_records_objects__object_slug__records_merge_post", input)`)
1613
+ - Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
1614
+ - API-key scope: `objects:write`
1615
+
1616
+ Eligible merge: resolve fields, archive the secondary (its values closed
1617
+ first), repoint links and associations onto the primary, write the primary.
1618
+ Needs objects:write AND objects:delete — both scope dependencies are real
1619
+ parameters so each carries its own ``required_api_key_scope`` marker.
1620
+ Delegates to the Studio function (same blockers, field resolution, cascade,
1621
+ far-end access rule and ``records_core`` switch).
1622
+
1623
+ **Input**
1624
+
1625
+ | Field | Type | Required | Description |
1626
+ |---|---|---|---|
1627
+ | `path.object_slug` | `string` | yes | |
1628
+ | `body` | `RecordMergeRequest` | yes | Request body; fields below. |
1629
+
1630
+ Body fields (`RecordMergeRequest`):
1631
+
1632
+ | Field | Type | Required | Description |
1633
+ |---|---|---|---|
1634
+ | `body.primary_record_id` | `string (uuid)` | yes | |
1635
+ | `body.secondary_record_id` | `string (uuid)` | yes | |
1636
+ | `body.expected_primary_revision` | `integer \| null` | no | min 1 |
1637
+ | `body.expected_secondary_revision` | `integer \| null` | no | min 1 |
1638
+ | `body.field_overrides` | `Array<RecordMergeFieldOverride>` | no | |
1639
+
1640
+ **Returns** `ApiResponse_RecordMergeResponse_`: the envelope `{ data: RecordMergeResponse, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1641
+
1642
+ Other envelope fields: `pagination` (PaginationMeta).
1643
+
1644
+ `RecordMergeResponse` fields:
1645
+
1646
+ | Field | Type | Required | Description |
1647
+ |---|---|---|---|
1648
+ | `cascade` | `RecordMergeCascade` | yes | |
1649
+ | `merge_history_id` | `string (uuid)` | yes | |
1650
+ | `record` | `RecordResponse` | yes | |
1651
+
1652
+ **Example**
1653
+
1654
+ ```ts
1655
+ const result = await g8.api.objects.mergeObjectRecords({
1656
+ path: { object_slug: "example" },
1657
+ body: {
1658
+ primary_record_id: "00000000-0000-0000-0000-000000000000",
1659
+ secondary_record_id: "00000000-0000-0000-0000-000000000000",
1660
+ },
1661
+ });
1662
+ ```
1663
+
1664
+ ---
1665
+
1666
+ <a id="op-previewobjectcsvimport"></a>
1667
+
1668
+ ### `g8.api.objects.previewObjectCsvImport(input)`
600
1669
 
601
- PREVIEW. This endpoint is deployed but gated: it returns 404 unless the hosted app platform is enabled for your organization. It is published here so the contract describes the whole surface, not so it can be called today.
1670
+ **Preview Object Csv Import**
602
1671
 
603
- List active fields. Archived-field discovery currently applies to custom objects.
1672
+ - HTTP: `POST /api/v1/objects/{object_slug}/imports/csv/drafts/{draft_id}/preview`
1673
+ - operationId: `preview_object_csv_import_objects__object_slug__imports_csv_drafts__draft_id__preview_post` (also callable as `g8.api.call("preview_object_csv_import_objects__object_slug__imports_csv_drafts__draft_id__preview_post", input)`)
1674
+ - Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
1675
+ - API-key scope: `objects:write`
1676
+
1677
+ Preview up to 100 rows of the stored file: normalized values, errors, upsert matches and rows already imported.
1678
+ Writes no records. Empty cells are omitted; \N clears a field.
604
1679
 
605
1680
  **Input**
606
1681
 
607
1682
  | Field | Type | Required | Description |
608
1683
  |---|---|---|---|
609
1684
  | `path.object_slug` | `string` | yes | |
610
- | `query.include_archived` | `boolean` | no | default `false` |
1685
+ | `path.draft_id` | `string (uuid)` | yes | |
1686
+ | `body` | `ImportPage` | yes | Request body; fields below. |
611
1687
 
612
- **Returns** `ApiResponse_list_AttributeDefinitionResponse__`: the envelope `{ data: Array<AttributeDefinitionResponse>, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1688
+ Body fields (`ImportPage`):
1689
+
1690
+ | Field | Type | Required | Description |
1691
+ |---|---|---|---|
1692
+ | `body.revision` | `integer` | yes | The draft revision this page was planned against min 1 |
1693
+ | `body.limit` | `integer` | no | default `100`, min 1, max 100 |
1694
+ | `body.offset` | `integer` | no | default `0`, min 0, max 4999 |
1695
+
1696
+ **Returns** `ApiResponse_ObjectCsvPreview_`: the envelope `{ data: ObjectCsvPreview, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
613
1697
 
614
1698
  Other envelope fields: `pagination` (PaginationMeta).
615
1699
 
616
- `AttributeDefinitionResponse` fields:
1700
+ `ObjectCsvPreview` fields:
617
1701
 
618
1702
  | Field | Type | Required | Description |
619
1703
  |---|---|---|---|
620
- | `attribute_type` | `string` | yes | One of the 16 supported attribute types (`text`, `number`, `email_address`, `timestamp`, `select`, `record_reference`, …). Determines how values are validated and canonicalized. |
621
- | `slug` | `string` | yes | Stable API slug for the attribute, used as a payload key. |
622
- | `title` | `string` | yes | Customer-facing field label, distinct from its stable API slug. |
623
- | `config` | `Record<string, unknown>` | no | Type-specific configuration, e.g. select options. Record references require target_object and must resolve to active records in that object within the caller's organization and app. |
624
- | `default_value` | `unknown` | no | Configured create default. Enabled non-null defaults pass the same validation as explicit values. |
625
- | `description` | `string \| null` | no | Customer-configured description of the field. |
626
- | `is_archived` | `boolean` | no | Archived fields retain their values and can be restored. default `false` |
627
- | `is_default_value_enabled` | `boolean` | no | Apply the configured default when this field is omitted on create. Never applies on PATCH. default `false` |
628
- | `is_multiselect` | `boolean` | no | Values are a list rather than a scalar. default `false` |
629
- | `is_required` | `boolean` | no | Required on create. PATCH may omit it, but cannot clear it with null or an empty multivalue list. default `false` |
630
- | `is_system` | `boolean` | no | Whether this field is protected as a system attribute. default `false` |
631
- | `is_unique` | `boolean` | no | No two active records may hold the same value for this attribute. A collision is rejected with `409 duplicate_active_value`. default `false` |
632
- | `sort_order` | `integer` | no | Configured display order; equal values are ordered by API slug. default `0` |
1704
+ | `completed` | `integer` | yes | |
1705
+ | `next_offset` | `integer \| null` | yes | |
1706
+ | `rows` | `Array<ImportPreviewRow>` | yes | |
1707
+ | `schema_fingerprint` | `string` | yes | |
1708
+ | `total` | `integer` | yes | |
633
1709
 
634
1710
  **Example**
635
1711
 
636
1712
  ```ts
637
- const result = await g8.api.objects.listObjectAttributes({ path: { object_slug: "example" } });
1713
+ const result = await g8.api.objects.previewObjectCsvImport({
1714
+ path: {
1715
+ object_slug: "example",
1716
+ draft_id: "00000000-0000-0000-0000-000000000000",
1717
+ },
1718
+ body: { revision: 1 },
1719
+ });
638
1720
  ```
639
1721
 
640
1722
  ---
641
1723
 
642
- <a id="op-listobjectrecords"></a>
1724
+ <a id="op-queryobjectboardgroups"></a>
643
1725
 
644
- ### `g8.api.objects.listObjectRecords(input)`
1726
+ ### `g8.api.objects.queryObjectBoardGroups(input)`
645
1727
 
646
- **List Object Records**
1728
+ **Query Object Board Groups**
647
1729
 
648
- - HTTP: `GET /api/v1/objects/{object_slug}/records`
649
- - operationId: `list_object_records_objects__object_slug__records_get` (also callable as `g8.api.call("list_object_records_objects__object_slug__records_get", input)`)
650
- - Tier: `read`: reads data; safe to call and to retry
1730
+ - HTTP: `POST /api/v1/objects/{object_slug}/views/board/groups`
1731
+ - operationId: `query_object_board_groups_objects__object_slug__views_board_groups_post` (also callable as `g8.api.call("query_object_board_groups_objects__object_slug__views_board_groups_post", input)`)
1732
+ - Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
651
1733
  - API-key scope: `objects:read`
652
- - Lifecycle: `preview` (may not be enabled for every org yet)
653
- - ★ Hand-written: [`g8.objects.listRecords()`](../sdk-clients.md#g8-objects-listrecords)
654
-
655
- PREVIEW. This endpoint is deployed but gated: it returns 404 unless the hosted app platform is enabled for your organization. It is published here so the contract describes the whole surface, not so it can be called today.
656
-
657
- List an object's records, newest last, with their active values.
658
1734
 
659
- Archived records are excluded. Supports page-number and opaque cursor
660
- pagination; when `cursor` is supplied it wins. Deals use canonical UUIDs,
661
- current ownership scope, typed values and independently permitted references.
1735
+ Read status groups and full filtered counts. This POST performs no writes.
662
1736
 
663
1737
  **Input**
664
1738
 
665
1739
  | Field | Type | Required | Description |
666
1740
  |---|---|---|---|
667
1741
  | `path.object_slug` | `string` | yes | |
668
- | `query.page` | `integer` | no | Page number (ignored when `cursor` is supplied) default `1` |
669
- | `query.limit` | `integer` | no | Items per page default `50` |
670
- | `query.cursor` | `string \| null` | no | Opaque pagination cursor from a prior response's `next_cursor`. When supplied it takes precedence over `page`. |
1742
+ | `body` | `ObjectViewState` | yes | Request body; fields below. |
671
1743
 
672
- **Returns** `ApiResponse_list_ObjectRecordResponse__`: the envelope `{ data: Array<ObjectRecordResponse>, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1744
+ Body fields (`ObjectViewState`):
1745
+
1746
+ | Field | Type | Required | Description |
1747
+ |---|---|---|---|
1748
+ | `body.columns` | `Array<string> \| null` | no | max items 200 |
1749
+ | `body.filters` | `Array<RecordFilter>` | no | max items 10 |
1750
+ | `body.groupBy` | `string \| null` | no | |
1751
+ | `body.includeArchived` | `boolean` | no | default `false` |
1752
+ | `body.layout` | `"table" \| "board"` | no | default `"table"` |
1753
+ | `body.search` | `string` | no | default `""`, max length 200 |
1754
+ | `body.sortBy` | `string \| null` | no | |
1755
+ | `body.sortOrder` | `"asc" \| "desc"` | no | default `"desc"` |
1756
+ | `body.version` | `1` | no | default `1` |
1757
+
1758
+ **Returns** `ApiResponse_list_ObjectBoardGroup__`: the envelope `{ data: Array<ObjectBoardGroup>, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
673
1759
 
674
1760
  Other envelope fields: `pagination` (PaginationMeta).
675
1761
 
676
- `ObjectRecordResponse` fields:
1762
+ `ObjectBoardGroup` fields:
677
1763
 
678
1764
  | Field | Type | Required | Description |
679
1765
  |---|---|---|---|
680
- | `id` | `string` | yes | Opaque record identifier. |
681
- | `object_slug` | `string` | yes | The object type this record belongs to. |
682
- | `created_at` | `string (date-time) \| null` | no | |
683
- | `is_archived` | `boolean` | no | Archived records are excluded from listings. default `false` |
684
- | `revision` | `integer` | no | Record revision for conditional updates. default `1`, min 1 |
685
- | `updated_at` | `string (date-time) \| null` | no | |
686
- | `values` | `Record<string, unknown>` | no | Currently active values, keyed by attribute slug. Shapes follow each attribute's own type; call `GET /objects/{object_slug}/attributes` for the schema. |
1766
+ | `label` | `string` | yes | |
1767
+ | `total` | `integer` | yes | |
1768
+ | `value` | `string \| null` | yes | |
687
1769
 
688
1770
  **Example**
689
1771
 
690
1772
  ```ts
691
- const result = await g8.api.objects.listObjectRecords({ path: { object_slug: "example" } });
1773
+ const result = await g8.api.objects.queryObjectBoardGroups({ path: { object_slug: "example" }, body: {} });
692
1774
  ```
693
1775
 
694
1776
  ---
695
1777
 
696
- <a id="op-listobjects"></a>
1778
+ <a id="op-queryobjectboardrecords"></a>
697
1779
 
698
- ### `g8.api.objects.listObjects(input?)`
1780
+ ### `g8.api.objects.queryObjectBoardRecords(input)`
699
1781
 
700
- **List Objects**
1782
+ **Query Object Board Records**
701
1783
 
702
- - HTTP: `GET /api/v1/objects`
703
- - operationId: `list_objects_objects_get` (also callable as `g8.api.call("list_objects_objects_get", input)`)
704
- - Tier: `read`: reads data; safe to call and to retry
1784
+ - HTTP: `POST /api/v1/objects/{object_slug}/views/board/records`
1785
+ - operationId: `query_object_board_records_objects__object_slug__views_board_records_post` (also callable as `g8.api.call("query_object_board_records_objects__object_slug__views_board_records_post", input)`)
1786
+ - Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
705
1787
  - API-key scope: `objects:read`
706
- - Lifecycle: `preview` (may not be enabled for every org yet)
707
- - ★ Hand-written: [`g8.objects.list()`](../sdk-clients.md#g8-objects-list)
708
1788
 
709
- PREVIEW. This endpoint is deployed but gated: it returns 404 unless the hosted app platform is enabled for your organization. It is published here so the contract describes the whole surface, not so it can be called today.
710
-
711
- List accessible registered standard and custom objects; optionally include archived custom definitions.
1789
+ Read a bounded status page with current record revisions. This POST performs no writes.
712
1790
 
713
1791
  **Input**
714
1792
 
715
1793
  | Field | Type | Required | Description |
716
1794
  |---|---|---|---|
717
- | `query.include_archived` | `boolean` | no | default `false` |
1795
+ | `path.object_slug` | `string` | yes | |
1796
+ | `body` | `ObjectBoardPage` | yes | Request body; fields below. |
718
1797
 
719
- **Returns** `ApiResponse_list_ObjectDefinitionResponse__`: the envelope `{ data: Array<ObjectDefinitionResponse>, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1798
+ Body fields (`ObjectBoardPage`):
1799
+
1800
+ | Field | Type | Required | Description |
1801
+ |---|---|---|---|
1802
+ | `body.state` | `ObjectViewState` | yes | |
1803
+ | `body.group_value` | `string \| null` | no | max length 500 |
1804
+ | `body.limit` | `integer` | no | default `20`, min 1, max 50 |
1805
+ | `body.offset` | `integer` | no | default `0`, min 0, max 1000000 |
1806
+
1807
+ **Returns** `ApiResponse_RecordListResponse_`: the envelope `{ data: RecordListResponse, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
720
1808
 
721
1809
  Other envelope fields: `pagination` (PaginationMeta).
722
1810
 
723
- `ObjectDefinitionResponse` fields:
1811
+ `RecordListResponse` fields:
724
1812
 
725
1813
  | Field | Type | Required | Description |
726
1814
  |---|---|---|---|
727
- | `plural_noun` | `string` | yes | Display name for many records, e.g. "Invoices". |
728
- | `singular_noun` | `string` | yes | Display name for one record, e.g. "Invoice". |
729
- | `slug` | `string` | yes | Stable API slug for the object type, e.g. `invoices`. |
730
- | `description` | `string \| null` | no | Customer-configured object description. |
731
- | `display_attribute_slug` | `string \| null` | no | Active single-value field used to label records; null uses the default. |
732
- | `icon` | `string \| null` | no | Configured graph8 icon name; null uses the default. |
733
- | `is_archived` | `boolean` | no | Archived objects are hidden from listings. default `false` |
734
- | `is_system` | `boolean` | no | True for objects graph8 ships; system objects cannot be deleted. default `false` |
1815
+ | `records` | `Array<RecordResponse>` | yes | |
1816
+ | `total` | `integer` | yes | |
735
1817
 
736
1818
  **Example**
737
1819
 
738
1820
  ```ts
739
- const result = await g8.api.objects.listObjects();
1821
+ const result = await g8.api.objects.queryObjectBoardRecords({ path: { object_slug: "example" }, body: { state: {} } });
740
1822
  ```
741
1823
 
742
1824
  ---
@@ -790,6 +1872,62 @@ const result = await g8.api.objects.restoreObjectRecord({ path: { object_slug: "
790
1872
 
791
1873
  ---
792
1874
 
1875
+ <a id="op-setdefaultobjectview"></a>
1876
+
1877
+ ### `g8.api.objects.setDefaultObjectView(input)`
1878
+
1879
+ **Set Default Object View**
1880
+
1881
+ - HTTP: `PUT /api/v1/objects/{object_slug}/views/default`
1882
+ - operationId: `set_default_object_view_objects__object_slug__views_default_put` (also callable as `g8.api.call("set_default_object_view_objects__object_slug__views_default_put", input)`)
1883
+ - Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
1884
+ - API-key scope: `objects:write`
1885
+
1886
+ Set or clear this credential's default within this object. Human defaults are unaffected.
1887
+
1888
+ **Input**
1889
+
1890
+ | Field | Type | Required | Description |
1891
+ |---|---|---|---|
1892
+ | `path.object_slug` | `string` | yes | |
1893
+ | `body` | `ObjectViewDefault` | yes | Request body; fields below. |
1894
+
1895
+ Body fields (`ObjectViewDefault`):
1896
+
1897
+ | Field | Type | Required | Description |
1898
+ |---|---|---|---|
1899
+ | `body.view_id` | `string (uuid) \| null` | no | |
1900
+
1901
+ **Returns** `ApiResponse_Union_SavedViewResponse__NoneType__`: the envelope `{ data: SavedViewResponse | null, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1902
+
1903
+ Other envelope fields: `pagination` (PaginationMeta).
1904
+
1905
+ `data` fields:
1906
+
1907
+ | Field | Type | Required | Description |
1908
+ |---|---|---|---|
1909
+ | `context_key` | `string \| null` | yes | |
1910
+ | `created_at` | `string (date-time) \| null` | yes | |
1911
+ | `created_by` | `string` | yes | |
1912
+ | `description` | `string \| null` | yes | |
1913
+ | `entity_type` | `EntityType` | yes | |
1914
+ | `id` | `string (uuid)` | yes | |
1915
+ | `is_default` | `boolean` | yes | |
1916
+ | `is_owner` | `boolean` | yes | |
1917
+ | `is_reusable` | `boolean` | yes | |
1918
+ | `state` | `Record<string, unknown>` | yes | |
1919
+ | `title` | `string` | yes | |
1920
+ | `updated_at` | `string (date-time) \| null` | yes | |
1921
+ | `visibility` | `Visibility` | yes | |
1922
+
1923
+ **Example**
1924
+
1925
+ ```ts
1926
+ const result = await g8.api.objects.setDefaultObjectView({ path: { object_slug: "example" }, body: {} });
1927
+ ```
1928
+
1929
+ ---
1930
+
793
1931
  <a id="op-updateattribute"></a>
794
1932
 
795
1933
  ### `g8.api.objects.updateAttribute(input)`
@@ -826,6 +1964,7 @@ Body fields (`AttributeUpdateRequest`):
826
1964
  | `body.is_unique` | `boolean \| null` | no | |
827
1965
  | `body.sort_order` | `integer \| null` | no | |
828
1966
  | `body.title` | `string \| null` | no | min length 1, max length 200 |
1967
+ | `body.visible_to_role_ids` | `Array<string (uuid)> \| null` | no | max items 100 |
829
1968
 
830
1969
  **Returns** `ApiResponse_AttributeDefinitionResponse_`: the envelope `{ data: AttributeDefinitionResponse, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
831
1970
 
@@ -848,6 +1987,7 @@ Other envelope fields: `pagination` (PaginationMeta).
848
1987
  | `is_system` | `boolean` | no | Whether this field is protected as a system attribute. default `false` |
849
1988
  | `is_unique` | `boolean` | no | No two active records may hold the same value for this attribute. A collision is rejected with `409 duplicate_active_value`. default `false` |
850
1989
  | `sort_order` | `integer` | no | Configured display order; equal values are ordered by API slug. default `0` |
1990
+ | `visible_to_role_ids` | `Array<string> \| null` | no | Role ids that may see this field; null means every role. Owners and admins always see every field. A field hidden from the caller is absent from every response. Set it with PATCH on this attribute. |
851
1991
 
852
1992
  **Example**
853
1993
 
@@ -917,6 +2057,77 @@ const result = await g8.api.objects.updateObject({ path: { object_slug: "example
917
2057
 
918
2058
  ---
919
2059
 
2060
+ <a id="op-updateobjectcsvimport"></a>
2061
+
2062
+ ### `g8.api.objects.updateObjectCsvImport(input)`
2063
+
2064
+ **Update Object Csv Import**
2065
+
2066
+ - HTTP: `PUT /api/v1/objects/{object_slug}/imports/csv/drafts/{draft_id}`
2067
+ - operationId: `update_object_csv_import_objects__object_slug__imports_csv_drafts__draft_id__put` (also callable as `g8.api.call("update_object_csv_import_objects__object_slug__imports_csv_drafts__draft_id__put", input)`)
2068
+ - Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
2069
+ - API-key scope: `objects:write`
2070
+
2071
+ Change the filename or setup. revision must be the import's current revision. The stored file never changes.
2072
+
2073
+ **Input**
2074
+
2075
+ | Field | Type | Required | Description |
2076
+ |---|---|---|---|
2077
+ | `path.object_slug` | `string` | yes | |
2078
+ | `path.draft_id` | `string (uuid)` | yes | |
2079
+ | `query.revision` | `integer` | yes | |
2080
+ | `body` | `ObjectImportUpdate` | yes | Request body; fields below. |
2081
+
2082
+ Body fields (`ObjectImportUpdate`):
2083
+
2084
+ | Field | Type | Required | Description |
2085
+ |---|---|---|---|
2086
+ | `body.filename` | `string` | yes | min length 1, max length 255 |
2087
+ | `body.mapping` | `Record<string, string>` | no | |
2088
+ | `body.matching_attribute` | `string \| null` | no | max length 100 |
2089
+ | `body.mode` | `"create" \| "upsert"` | no | default `"create"` |
2090
+
2091
+ **Returns** `ApiResponse_ObjectImportDetail_`: the envelope `{ data: ObjectImportDetail, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
2092
+
2093
+ Other envelope fields: `pagination` (PaginationMeta).
2094
+
2095
+ `ObjectImportDetail` fields:
2096
+
2097
+ | Field | Type | Required | Description |
2098
+ |---|---|---|---|
2099
+ | `completed` | `integer` | yes | |
2100
+ | `created_at` | `string (date-time)` | yes | |
2101
+ | `error_rows` | `integer` | yes | |
2102
+ | `expires_at` | `string (date-time)` | yes | |
2103
+ | `filename` | `string` | yes | |
2104
+ | `headers` | `Array<string>` | yes | |
2105
+ | `id` | `string (uuid)` | yes | |
2106
+ | `owner_id` | `string` | yes | |
2107
+ | `owner_type` | `"user" \| "api"` | yes | |
2108
+ | `revision` | `integer` | yes | |
2109
+ | `setup` | `ObjectImportSetup` | yes | |
2110
+ | `source_available` | `boolean` | yes | |
2111
+ | `status` | `"draft" \| "partial" \| "completed" \| "expired"` | yes | |
2112
+ | `total` | `integer` | yes | |
2113
+ | `updated_at` | `string (date-time)` | yes | |
2114
+ | `sample` | `Array<Array<string>>` | no | First rows of the file while it is still stored |
2115
+
2116
+ **Example**
2117
+
2118
+ ```ts
2119
+ const result = await g8.api.objects.updateObjectCsvImport({
2120
+ path: {
2121
+ object_slug: "example",
2122
+ draft_id: "00000000-0000-0000-0000-000000000000",
2123
+ },
2124
+ query: { revision: 1 },
2125
+ body: { filename: "Example" },
2126
+ });
2127
+ ```
2128
+
2129
+ ---
2130
+
920
2131
  <a id="op-updateobjectrecord"></a>
921
2132
 
922
2133
  ### `g8.api.objects.updateObjectRecord(input)`
@@ -980,6 +2191,70 @@ const result = await g8.api.objects.updateObjectRecord({ path: { object_slug: "e
980
2191
 
981
2192
  ---
982
2193
 
2194
+ <a id="op-updateobjectview"></a>
2195
+
2196
+ ### `g8.api.objects.updateObjectView(input)`
2197
+
2198
+ **Update Object View**
2199
+
2200
+ - HTTP: `PUT /api/v1/objects/{object_slug}/views/{view_id}`
2201
+ - operationId: `update_object_view_objects__object_slug__views__view_id__put` (also callable as `g8.api.call("update_object_view_objects__object_slug__views__view_id__put", input)`)
2202
+ - Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
2203
+ - API-key scope: `objects:write`
2204
+
2205
+ Rename or replace settings on a view owned by this credential.
2206
+
2207
+ **Input**
2208
+
2209
+ | Field | Type | Required | Description |
2210
+ |---|---|---|---|
2211
+ | `path.object_slug` | `string` | yes | |
2212
+ | `path.view_id` | `string (uuid)` | yes | |
2213
+ | `body` | `ObjectViewUpdate` | yes | Request body; fields below. |
2214
+
2215
+ Body fields (`ObjectViewUpdate`):
2216
+
2217
+ | Field | Type | Required | Description |
2218
+ |---|---|---|---|
2219
+ | `body.state` | `ObjectViewState \| null` | no | |
2220
+ | `body.title` | `string \| null` | no | min length 1, max length 120 |
2221
+
2222
+ **Returns** `ApiResponse_SavedViewResponse_`: the envelope `{ data: SavedViewResponse, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
2223
+
2224
+ Other envelope fields: `pagination` (PaginationMeta).
2225
+
2226
+ `SavedViewResponse` fields:
2227
+
2228
+ | Field | Type | Required | Description |
2229
+ |---|---|---|---|
2230
+ | `context_key` | `string \| null` | yes | |
2231
+ | `created_at` | `string (date-time) \| null` | yes | |
2232
+ | `created_by` | `string` | yes | |
2233
+ | `description` | `string \| null` | yes | |
2234
+ | `entity_type` | `EntityType` | yes | |
2235
+ | `id` | `string (uuid)` | yes | |
2236
+ | `is_default` | `boolean` | yes | |
2237
+ | `is_owner` | `boolean` | yes | |
2238
+ | `is_reusable` | `boolean` | yes | |
2239
+ | `state` | `Record<string, unknown>` | yes | |
2240
+ | `title` | `string` | yes | |
2241
+ | `updated_at` | `string (date-time) \| null` | yes | |
2242
+ | `visibility` | `Visibility` | yes | |
2243
+
2244
+ **Example**
2245
+
2246
+ ```ts
2247
+ const result = await g8.api.objects.updateObjectView({
2248
+ path: {
2249
+ object_slug: "example",
2250
+ view_id: "00000000-0000-0000-0000-000000000000",
2251
+ },
2252
+ body: {},
2253
+ });
2254
+ ```
2255
+
2256
+ ---
2257
+
983
2258
  <a id="op-upsertobjectrecord"></a>
984
2259
 
985
2260
  ### `g8.api.objects.upsertObjectRecord(input)`
@@ -1065,6 +2340,97 @@ Valid attribute types for the Custom Objects type system.
1065
2340
 
1066
2341
  Type: `"text" | "number" | "currency" | "date" | "timestamp" | "checkbox" | "select" | "status" | …`.
1067
2342
 
2343
+ <a id="type-entitytype"></a>
2344
+
2345
+ ### `EntityType`
2346
+
2347
+ Which CRM grid the saved view applies to. Free-form string at the DB level (cb_saved_views.entity_type is VARCHAR(50)) to avoid a schema migration when we add deals/tasks/leads — but enforced as an enum at the API boundary so we don't accept typos. NEITHER A SUBSET NOR A SUPERSET OF ``FilterEntityType`` — see the invariant on that class, and the sibling docstring below, which states the same relationship from the other side. The two enums overlap on the four GRID values (``contacts``, ``companies``, ``deals``, ``leads``); ``FilterEntityType`` is a superset of THOSE and adds ``report``, while…
2348
+
2349
+ Type: `"custom_objects" | "contacts" | "companies" | "deals" | "leads" | "lists" | "contacts_view" | "companies_view" | …`.
2350
+
2351
+ <a id="type-importpreviewrow"></a>
2352
+
2353
+ ### `ImportPreviewRow`
2354
+
2355
+ | Field | Type | Required | Description |
2356
+ |---|---|---|---|
2357
+ | `row_number` | `integer` | yes | min 2 |
2358
+ | `already_imported` | `boolean` | no | default `false` |
2359
+ | `errors` | `Array<Record<string, unknown>>` | no | |
2360
+ | `record_id` | `string (uuid) \| null` | no | |
2361
+ | `revision` | `integer \| null` | no | min 1 |
2362
+ | `values` | `Record<string, unknown>` | no | |
2363
+
2364
+ <a id="type-importreceiptrow"></a>
2365
+
2366
+ ### `ImportReceiptRow`
2367
+
2368
+ | Field | Type | Required | Description |
2369
+ |---|---|---|---|
2370
+ | `action` | `"created" \| "updated"` | yes | |
2371
+ | `record_id` | `string (uuid)` | yes | |
2372
+ | `revision` | `integer` | yes | |
2373
+ | `row_number` | `integer` | yes | |
2374
+ | `replayed` | `boolean` | no | default `false` |
2375
+
2376
+ <a id="type-importrowexpectation"></a>
2377
+
2378
+ ### `ImportRowExpectation`
2379
+
2380
+ | Field | Type | Required | Description |
2381
+ |---|---|---|---|
2382
+ | `row_number` | `integer` | yes | min 2 |
2383
+ | `record_id` | `string (uuid) \| null` | no | |
2384
+ | `revision` | `integer \| null` | no | min 1 |
2385
+
2386
+ <a id="type-importskippedrow"></a>
2387
+
2388
+ ### `ImportSkippedRow`
2389
+
2390
+ A row this commit did not import; its errors are kept for the error file.
2391
+
2392
+ | Field | Type | Required | Description |
2393
+ |---|---|---|---|
2394
+ | `errors` | `Array<Record<string, unknown>>` | yes | |
2395
+ | `row_number` | `integer` | yes | |
2396
+
2397
+ <a id="type-objectimportsetup"></a>
2398
+
2399
+ ### `ObjectImportSetup`
2400
+
2401
+ Column mapping (CSV header -> field slug) and match mode. May be incomplete while saved; preview and commit need an executable setup.
2402
+
2403
+ | Field | Type | Required | Description |
2404
+ |---|---|---|---|
2405
+ | `mapping` | `Record<string, string>` | no | |
2406
+ | `matching_attribute` | `string \| null` | no | max length 100 |
2407
+ | `mode` | `"create" \| "upsert"` | no | default `"create"` |
2408
+
2409
+ <a id="type-recordbulkupdatefailure"></a>
2410
+
2411
+ ### `RecordBulkUpdateFailure`
2412
+
2413
+ One record a bulk update did not change. ``error`` is the human message (kept for existing clients); ``code`` is stable for UIs to branch on: locked, archived, not_found, scope_changed, unique_conflict, invalid_value, constraint_violation or rejected; ``attribute_slug`` names the field when one field caused it.
2414
+
2415
+ | Field | Type | Required | Description |
2416
+ |---|---|---|---|
2417
+ | `error` | `string` | yes | |
2418
+ | `id` | `string (uuid)` | yes | |
2419
+ | `attribute_slug` | `string \| null` | no | |
2420
+ | `code` | `string` | no | default `"rejected"` |
2421
+
2422
+ <a id="type-recordfilter"></a>
2423
+
2424
+ ### `RecordFilter`
2425
+
2426
+ Filter parameters for listing records.
2427
+
2428
+ | Field | Type | Required | Description |
2429
+ |---|---|---|---|
2430
+ | `attribute_slug` | `string` | yes | |
2431
+ | `operator` | `"eq" \| "ne" \| "gt" \| "gte" \| "lt" \| "lte" \| "contains" \| "starts_with" \| …` | yes | |
2432
+ | `value` | `unknown \| null` | no | |
2433
+
1068
2434
  <a id="type-recordhistoryentry"></a>
1069
2435
 
1070
2436
  ### `RecordHistoryEntry`
@@ -1079,6 +2445,26 @@ One generation of one attribute's value. Values are TEMPORAL rather than mutable
1079
2445
  | `actor_id` | `string \| null` | no | Opaque id of whoever set it. |
1080
2446
  | `value` | `unknown` | no | The value held during this generation. |
1081
2447
 
2448
+ <a id="type-recordmergecascade"></a>
2449
+
2450
+ ### `RecordMergeCascade`
2451
+
2452
+ | Field | Type | Required | Description |
2453
+ |---|---|---|---|
2454
+ | `associations_deleted` | `integer` | yes | |
2455
+ | `associations_repointed` | `integer` | yes | |
2456
+ | `relationships_deleted` | `integer` | yes | |
2457
+ | `relationships_repointed` | `integer` | yes | |
2458
+
2459
+ <a id="type-recordmergefieldoverride"></a>
2460
+
2461
+ ### `RecordMergeFieldOverride`
2462
+
2463
+ | Field | Type | Required | Description |
2464
+ |---|---|---|---|
2465
+ | `attribute_slug` | `string` | yes | |
2466
+ | `winner` | `"primary" \| "secondary"` | yes | |
2467
+
1082
2468
  <a id="type-recordmutationentry"></a>
1083
2469
 
1084
2470
  ### `RecordMutationEntry`
@@ -1096,3 +2482,70 @@ One generation of one attribute's value. Values are TEMPORAL rather than mutable
1096
2482
  | `source` | `string` | yes | |
1097
2483
  | `was_archived` | `boolean` | yes | |
1098
2484
  | `app_id` | `string \| null` | no | |
2485
+
2486
+ <a id="type-recordresponse"></a>
2487
+
2488
+ ### `RecordResponse`
2489
+
2490
+ Response for a record with its current attribute values.
2491
+
2492
+ | Field | Type | Required | Description |
2493
+ |---|---|---|---|
2494
+ | `created_at` | `string (date-time)` | yes | |
2495
+ | `id` | `string (uuid)` | yes | |
2496
+ | `is_archived` | `boolean` | yes | |
2497
+ | `object_definition_id` | `string (uuid)` | yes | |
2498
+ | `organization_id` | `string` | yes | |
2499
+ | `updated_at` | `string (date-time)` | yes | |
2500
+ | `values` | `Record<string, unknown>` | yes | |
2501
+ | `revision` | `integer` | no | default `1`, min 1 |
2502
+
2503
+ <a id="type-relatedrecordedge"></a>
2504
+
2505
+ ### `RelatedRecordEdge`
2506
+
2507
+ | Field | Type | Required | Description |
2508
+ |---|---|---|---|
2509
+ | `can_unlink` | `boolean` | yes | |
2510
+ | `definition_id` | `string (uuid)` | yes | |
2511
+ | `definition_revision` | `integer` | yes | |
2512
+ | `id` | `string (uuid)` | yes | |
2513
+ | `relationship_label` | `string` | yes | |
2514
+ | `source_kind` | `"custom" \| "contacts" \| "companies" \| "deals"` | yes | |
2515
+ | `source_label` | `string \| null` | yes | |
2516
+ | `source_object_slug` | `string` | yes | |
2517
+ | `source_record_id` | `string` | yes | |
2518
+ | `source_revision` | `integer` | yes | |
2519
+ | `target_kind` | `"custom" \| "contacts" \| "companies" \| "deals"` | yes | |
2520
+ | `target_label` | `string \| null` | yes | |
2521
+ | `target_object_slug` | `string` | yes | |
2522
+ | `target_record_id` | `string` | yes | |
2523
+ | `target_revision` | `integer` | yes | |
2524
+
2525
+ <a id="type-relationshipdefinitionresponse"></a>
2526
+
2527
+ ### `RelationshipDefinitionResponse`
2528
+
2529
+ | Field | Type | Required | Description |
2530
+ |---|---|---|---|
2531
+ | `api_slug` | `string` | yes | |
2532
+ | `created_at` | `string (date-time)` | yes | |
2533
+ | `id` | `string (uuid)` | yes | |
2534
+ | `is_archived` | `boolean` | yes | |
2535
+ | `revision` | `integer` | yes | |
2536
+ | `source_kind` | `string` | yes | |
2537
+ | `source_label` | `string` | yes | |
2538
+ | `source_many` | `boolean` | yes | |
2539
+ | `source_object_definition_id` | `string (uuid) \| null` | yes | |
2540
+ | `target_kind` | `string` | yes | |
2541
+ | `target_label` | `string` | yes | |
2542
+ | `target_many` | `boolean` | yes | |
2543
+ | `target_object_definition_id` | `string (uuid) \| null` | yes | |
2544
+
2545
+ <a id="type-visibility"></a>
2546
+
2547
+ ### `Visibility`
2548
+
2549
+ Who can apply a view. Only the creator can update or delete it.
2550
+
2551
+ Type: `"private" | "org"`.