@graph8/sdk 0.303.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.
- package/dist/index.d.mts +786 -8
- package/dist/index.d.ts +786 -8
- package/dist/index.js +24 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +24 -2
- package/dist/index.mjs.map +1 -1
- package/dist/react.d.mts +745 -5
- package/dist/react.d.ts +745 -5
- package/dist/react.js +23 -1
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +23 -1
- package/dist/react.mjs.map +1 -1
- package/dist/types/version.d.ts +2 -2
- package/docs/agents.md +7 -7
- package/docs/api/README.md +3 -2
- package/docs/api/appObjects.d.ts +2 -0
- package/docs/api/appObjects.md +1 -0
- package/docs/api/by-path.md +22 -0
- package/docs/api/dataPipelines.d.ts +149 -0
- package/docs/api/dataPipelines.md +232 -0
- package/docs/api/forms.d.ts +16 -0
- package/docs/api/forms.md +8 -0
- package/docs/api/objects.d.ts +635 -2
- package/docs/api/objects.md +1016 -8
- package/docs/api/ops.d.ts +1 -1
- package/docs/api/ops.md +1 -1
- package/docs/api/quotes.d.ts +3 -1
- package/docs/api/quotes.md +7 -2
- package/docs/api/radar.d.ts +4 -0
- package/docs/api/radar.md +1 -0
- package/package.json +1 -1
package/docs/api/objects.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# `g8.api.objects`: Objects
|
|
4
4
|
|
|
5
|
-
|
|
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
|
|
|
@@ -26,25 +26,42 @@ Exact TypeScript types for every operation on this page, and every schema they u
|
|
|
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
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 |
|
|
29
30
|
| [`createAttribute`](#op-createattribute) ★ | `POST /api/v1/objects/{object_slug}/attributes` | write | `objects:manage` | Create Attribute |
|
|
30
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 |
|
|
31
33
|
| [`createObjectRecord`](#op-createobjectrecord) ★ | `POST /api/v1/objects/{object_slug}/records` | write | `objects:write` | Create Object Record |
|
|
32
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 |
|
|
33
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 |
|
|
34
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 |
|
|
35
43
|
| [`getObjectRecord`](#op-getobjectrecord) ★ | `GET /api/v1/objects/{object_slug}/records/{record_id}` | read | `objects:read` | Get Object Record |
|
|
36
44
|
| [`getObjectRecordChanges`](#op-getobjectrecordchanges) ★ | `GET /api/v1/objects/{object_slug}/records/{record_id}/changes` | read | `objects:read` | Get Object Record Changes |
|
|
37
45
|
| [`getObjectRecordHistory`](#op-getobjectrecordhistory) ★ | `GET /api/v1/objects/{object_slug}/records/{record_id}/history` | read | `objects:read` | Get Object Record History |
|
|
38
46
|
| [`getObjectRelationshipDefinitions`](#op-getobjectrelationshipdefinitions) | `GET /api/v1/objects/{object_slug}/relationships` | read | `objects:read` | Get Object Relationship Definitions |
|
|
39
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 |
|
|
40
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 |
|
|
41
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 |
|
|
42
53
|
| [`listObjects`](#op-listobjects) ★ | `GET /api/v1/objects` | read | `objects:read` | List Objects |
|
|
43
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 |
|
|
44
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 |
|
|
45
60
|
| [`updateAttribute`](#op-updateattribute) ★ | `PATCH /api/v1/objects/{object_slug}/attributes/{attr_slug}` | write | `objects:manage` | Update Attribute |
|
|
46
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 |
|
|
47
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 |
|
|
48
65
|
| [`upsertObjectRecord`](#op-upsertobjectrecord) ★ | `POST /api/v1/objects/{object_slug}/records/upsert` | write | `objects:write` | Upsert Object Record |
|
|
49
66
|
|
|
50
67
|
---
|
|
@@ -91,6 +108,7 @@ Other envelope fields: `pagination` (PaginationMeta).
|
|
|
91
108
|
| `is_system` | `boolean` | no | Whether this field is protected as a system attribute. default `false` |
|
|
92
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` |
|
|
93
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. |
|
|
94
112
|
|
|
95
113
|
**Example**
|
|
96
114
|
|
|
@@ -259,6 +277,80 @@ const result = await g8.api.objects.bulkUpdateObjectRecords({ path: { object_slu
|
|
|
259
277
|
|
|
260
278
|
---
|
|
261
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
|
+
|
|
262
354
|
<a id="op-createattribute"></a>
|
|
263
355
|
|
|
264
356
|
### `g8.api.objects.createAttribute(input)`
|
|
@@ -320,6 +412,7 @@ Other envelope fields: `pagination` (PaginationMeta).
|
|
|
320
412
|
| `is_system` | `boolean` | no | Whether this field is protected as a system attribute. default `false` |
|
|
321
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` |
|
|
322
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. |
|
|
323
416
|
|
|
324
417
|
**Example**
|
|
325
418
|
|
|
@@ -392,6 +485,73 @@ const result = await g8.api.objects.createObject({
|
|
|
392
485
|
|
|
393
486
|
---
|
|
394
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
|
+
|
|
395
555
|
<a id="op-createobjectrecord"></a>
|
|
396
556
|
|
|
397
557
|
### `g8.api.objects.createObjectRecord(input)`
|
|
@@ -518,6 +678,104 @@ const result = await g8.api.objects.createObjectRelationship({
|
|
|
518
678
|
|
|
519
679
|
---
|
|
520
680
|
|
|
681
|
+
<a id="op-createobjectview"></a>
|
|
682
|
+
|
|
683
|
+
### `g8.api.objects.createObjectView(input)`
|
|
684
|
+
|
|
685
|
+
**Create Object View**
|
|
686
|
+
|
|
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`
|
|
691
|
+
|
|
692
|
+
Save a private or shared view owned by this credential, without impersonating a human.
|
|
693
|
+
|
|
694
|
+
**Input**
|
|
695
|
+
|
|
696
|
+
| Field | Type | Required | Description |
|
|
697
|
+
|---|---|---|---|
|
|
698
|
+
| `path.object_slug` | `string` | yes | |
|
|
699
|
+
| `body` | `ObjectViewCreate` | yes | Request body; fields below. |
|
|
700
|
+
|
|
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`.
|
|
710
|
+
|
|
711
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
712
|
+
|
|
713
|
+
`SavedViewResponse` fields:
|
|
714
|
+
|
|
715
|
+
| Field | Type | Required | Description |
|
|
716
|
+
|---|---|---|---|
|
|
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 | |
|
|
730
|
+
|
|
731
|
+
**Example**
|
|
732
|
+
|
|
733
|
+
```ts
|
|
734
|
+
const result = await g8.api.objects.createObjectView({ path: { object_slug: "example" }, body: { title: "Example" } });
|
|
735
|
+
```
|
|
736
|
+
|
|
737
|
+
---
|
|
738
|
+
|
|
739
|
+
<a id="op-deleteobjectcsvimport"></a>
|
|
740
|
+
|
|
741
|
+
### `g8.api.objects.deleteObjectCsvImport(input)`
|
|
742
|
+
|
|
743
|
+
**Delete Object Csv Import**
|
|
744
|
+
|
|
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`
|
|
749
|
+
|
|
750
|
+
Delete the stored file and setup. Records already imported, their history and import receipts are kept.
|
|
751
|
+
|
|
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
|
+
|
|
521
779
|
<a id="op-deleteobjectrelationship"></a>
|
|
522
780
|
|
|
523
781
|
### `g8.api.objects.deleteObjectRelationship(input)`
|
|
@@ -589,6 +847,120 @@ const result = await g8.api.objects.deleteObjectRelationship({
|
|
|
589
847
|
|
|
590
848
|
---
|
|
591
849
|
|
|
850
|
+
<a id="op-deleteobjectview"></a>
|
|
851
|
+
|
|
852
|
+
### `g8.api.objects.deleteObjectView(input)`
|
|
853
|
+
|
|
854
|
+
**Delete Object View**
|
|
855
|
+
|
|
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`
|
|
860
|
+
|
|
861
|
+
Delete a view owned by this credential. Does not delete records.
|
|
862
|
+
|
|
863
|
+
**Input**
|
|
864
|
+
|
|
865
|
+
| Field | Type | Required | Description |
|
|
866
|
+
|---|---|---|---|
|
|
867
|
+
| `path.object_slug` | `string` | yes | |
|
|
868
|
+
| `path.view_id` | `string (uuid)` | yes | |
|
|
869
|
+
|
|
870
|
+
**Returns** `ApiResponse_NoneType_`: the envelope `{ data: null, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
871
|
+
|
|
872
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
873
|
+
|
|
874
|
+
**Example**
|
|
875
|
+
|
|
876
|
+
```ts
|
|
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
|
+
});
|
|
884
|
+
```
|
|
885
|
+
|
|
886
|
+
---
|
|
887
|
+
|
|
888
|
+
<a id="op-downloadobjectcsvimporterrors"></a>
|
|
889
|
+
|
|
890
|
+
### `g8.api.objects.downloadObjectCsvImportErrors(input)`
|
|
891
|
+
|
|
892
|
+
**Download Object Csv Import Errors**
|
|
893
|
+
|
|
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)`)
|
|
896
|
+
- Tier: `read`: reads data; safe to call and to retry
|
|
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
|
+
|
|
592
964
|
<a id="op-getobject"></a>
|
|
593
965
|
|
|
594
966
|
### `g8.api.objects.getObject(input)`
|
|
@@ -637,6 +1009,64 @@ const result = await g8.api.objects.getObject({ path: { object_slug: "example" }
|
|
|
637
1009
|
|
|
638
1010
|
---
|
|
639
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
|
+
|
|
640
1070
|
<a id="op-getobjectrecord"></a>
|
|
641
1071
|
|
|
642
1072
|
### `g8.api.objects.getObjectRecord(input)`
|
|
@@ -869,16 +1299,62 @@ const result = await g8.api.objects.getObjectRelationships({ path: { object_slug
|
|
|
869
1299
|
|
|
870
1300
|
---
|
|
871
1301
|
|
|
872
|
-
<a id="op-
|
|
1302
|
+
<a id="op-inspectobjectcsvimport"></a>
|
|
873
1303
|
|
|
874
|
-
### `g8.api.objects.
|
|
1304
|
+
### `g8.api.objects.inspectObjectCsvImport(input)`
|
|
875
1305
|
|
|
876
|
-
**
|
|
1306
|
+
**Inspect Object Csv Import**
|
|
877
1307
|
|
|
878
|
-
- HTTP: `
|
|
879
|
-
- operationId: `
|
|
880
|
-
- Tier: `
|
|
881
|
-
- API-key scope: `objects:
|
|
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`
|
|
882
1358
|
- Lifecycle: `preview` (may not be enabled for every org yet)
|
|
883
1359
|
- ★ Hand-written: [`g8.objects.listAttributes()`](../sdk-clients.md#g8-objects-listattributes)
|
|
884
1360
|
|
|
@@ -914,6 +1390,7 @@ Other envelope fields: `pagination` (PaginationMeta).
|
|
|
914
1390
|
| `is_system` | `boolean` | no | Whether this field is protected as a system attribute. default `false` |
|
|
915
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` |
|
|
916
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. |
|
|
917
1394
|
|
|
918
1395
|
**Example**
|
|
919
1396
|
|
|
@@ -923,6 +1400,57 @@ const result = await g8.api.objects.listObjectAttributes({ path: { object_slug:
|
|
|
923
1400
|
|
|
924
1401
|
---
|
|
925
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
|
+
|
|
926
1454
|
<a id="op-listobjectrecords"></a>
|
|
927
1455
|
|
|
928
1456
|
### `g8.api.objects.listObjectRecords(input)`
|
|
@@ -977,6 +1505,55 @@ const result = await g8.api.objects.listObjectRecords({ path: { object_slug: "ex
|
|
|
977
1505
|
|
|
978
1506
|
---
|
|
979
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
|
+
|
|
980
1557
|
<a id="op-listobjects"></a>
|
|
981
1558
|
|
|
982
1559
|
### `g8.api.objects.listObjects(input?)`
|
|
@@ -1086,6 +1663,166 @@ const result = await g8.api.objects.mergeObjectRecords({
|
|
|
1086
1663
|
|
|
1087
1664
|
---
|
|
1088
1665
|
|
|
1666
|
+
<a id="op-previewobjectcsvimport"></a>
|
|
1667
|
+
|
|
1668
|
+
### `g8.api.objects.previewObjectCsvImport(input)`
|
|
1669
|
+
|
|
1670
|
+
**Preview Object Csv Import**
|
|
1671
|
+
|
|
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.
|
|
1679
|
+
|
|
1680
|
+
**Input**
|
|
1681
|
+
|
|
1682
|
+
| Field | Type | Required | Description |
|
|
1683
|
+
|---|---|---|---|
|
|
1684
|
+
| `path.object_slug` | `string` | yes | |
|
|
1685
|
+
| `path.draft_id` | `string (uuid)` | yes | |
|
|
1686
|
+
| `body` | `ImportPage` | yes | Request body; fields below. |
|
|
1687
|
+
|
|
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`.
|
|
1697
|
+
|
|
1698
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
1699
|
+
|
|
1700
|
+
`ObjectCsvPreview` fields:
|
|
1701
|
+
|
|
1702
|
+
| Field | Type | Required | Description |
|
|
1703
|
+
|---|---|---|---|
|
|
1704
|
+
| `completed` | `integer` | yes | |
|
|
1705
|
+
| `next_offset` | `integer \| null` | yes | |
|
|
1706
|
+
| `rows` | `Array<ImportPreviewRow>` | yes | |
|
|
1707
|
+
| `schema_fingerprint` | `string` | yes | |
|
|
1708
|
+
| `total` | `integer` | yes | |
|
|
1709
|
+
|
|
1710
|
+
**Example**
|
|
1711
|
+
|
|
1712
|
+
```ts
|
|
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
|
+
});
|
|
1720
|
+
```
|
|
1721
|
+
|
|
1722
|
+
---
|
|
1723
|
+
|
|
1724
|
+
<a id="op-queryobjectboardgroups"></a>
|
|
1725
|
+
|
|
1726
|
+
### `g8.api.objects.queryObjectBoardGroups(input)`
|
|
1727
|
+
|
|
1728
|
+
**Query Object Board Groups**
|
|
1729
|
+
|
|
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
|
|
1733
|
+
- API-key scope: `objects:read`
|
|
1734
|
+
|
|
1735
|
+
Read status groups and full filtered counts. This POST performs no writes.
|
|
1736
|
+
|
|
1737
|
+
**Input**
|
|
1738
|
+
|
|
1739
|
+
| Field | Type | Required | Description |
|
|
1740
|
+
|---|---|---|---|
|
|
1741
|
+
| `path.object_slug` | `string` | yes | |
|
|
1742
|
+
| `body` | `ObjectViewState` | yes | Request body; fields below. |
|
|
1743
|
+
|
|
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`.
|
|
1759
|
+
|
|
1760
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
1761
|
+
|
|
1762
|
+
`ObjectBoardGroup` fields:
|
|
1763
|
+
|
|
1764
|
+
| Field | Type | Required | Description |
|
|
1765
|
+
|---|---|---|---|
|
|
1766
|
+
| `label` | `string` | yes | |
|
|
1767
|
+
| `total` | `integer` | yes | |
|
|
1768
|
+
| `value` | `string \| null` | yes | |
|
|
1769
|
+
|
|
1770
|
+
**Example**
|
|
1771
|
+
|
|
1772
|
+
```ts
|
|
1773
|
+
const result = await g8.api.objects.queryObjectBoardGroups({ path: { object_slug: "example" }, body: {} });
|
|
1774
|
+
```
|
|
1775
|
+
|
|
1776
|
+
---
|
|
1777
|
+
|
|
1778
|
+
<a id="op-queryobjectboardrecords"></a>
|
|
1779
|
+
|
|
1780
|
+
### `g8.api.objects.queryObjectBoardRecords(input)`
|
|
1781
|
+
|
|
1782
|
+
**Query Object Board Records**
|
|
1783
|
+
|
|
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
|
|
1787
|
+
- API-key scope: `objects:read`
|
|
1788
|
+
|
|
1789
|
+
Read a bounded status page with current record revisions. This POST performs no writes.
|
|
1790
|
+
|
|
1791
|
+
**Input**
|
|
1792
|
+
|
|
1793
|
+
| Field | Type | Required | Description |
|
|
1794
|
+
|---|---|---|---|
|
|
1795
|
+
| `path.object_slug` | `string` | yes | |
|
|
1796
|
+
| `body` | `ObjectBoardPage` | yes | Request body; fields below. |
|
|
1797
|
+
|
|
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`.
|
|
1808
|
+
|
|
1809
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
1810
|
+
|
|
1811
|
+
`RecordListResponse` fields:
|
|
1812
|
+
|
|
1813
|
+
| Field | Type | Required | Description |
|
|
1814
|
+
|---|---|---|---|
|
|
1815
|
+
| `records` | `Array<RecordResponse>` | yes | |
|
|
1816
|
+
| `total` | `integer` | yes | |
|
|
1817
|
+
|
|
1818
|
+
**Example**
|
|
1819
|
+
|
|
1820
|
+
```ts
|
|
1821
|
+
const result = await g8.api.objects.queryObjectBoardRecords({ path: { object_slug: "example" }, body: { state: {} } });
|
|
1822
|
+
```
|
|
1823
|
+
|
|
1824
|
+
---
|
|
1825
|
+
|
|
1089
1826
|
<a id="op-restoreobjectrecord"></a>
|
|
1090
1827
|
|
|
1091
1828
|
### `g8.api.objects.restoreObjectRecord(input)`
|
|
@@ -1135,6 +1872,62 @@ const result = await g8.api.objects.restoreObjectRecord({ path: { object_slug: "
|
|
|
1135
1872
|
|
|
1136
1873
|
---
|
|
1137
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
|
+
|
|
1138
1931
|
<a id="op-updateattribute"></a>
|
|
1139
1932
|
|
|
1140
1933
|
### `g8.api.objects.updateAttribute(input)`
|
|
@@ -1171,6 +1964,7 @@ Body fields (`AttributeUpdateRequest`):
|
|
|
1171
1964
|
| `body.is_unique` | `boolean \| null` | no | |
|
|
1172
1965
|
| `body.sort_order` | `integer \| null` | no | |
|
|
1173
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 |
|
|
1174
1968
|
|
|
1175
1969
|
**Returns** `ApiResponse_AttributeDefinitionResponse_`: the envelope `{ data: AttributeDefinitionResponse, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
1176
1970
|
|
|
@@ -1193,6 +1987,7 @@ Other envelope fields: `pagination` (PaginationMeta).
|
|
|
1193
1987
|
| `is_system` | `boolean` | no | Whether this field is protected as a system attribute. default `false` |
|
|
1194
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` |
|
|
1195
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. |
|
|
1196
1991
|
|
|
1197
1992
|
**Example**
|
|
1198
1993
|
|
|
@@ -1262,6 +2057,77 @@ const result = await g8.api.objects.updateObject({ path: { object_slug: "example
|
|
|
1262
2057
|
|
|
1263
2058
|
---
|
|
1264
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
|
+
|
|
1265
2131
|
<a id="op-updateobjectrecord"></a>
|
|
1266
2132
|
|
|
1267
2133
|
### `g8.api.objects.updateObjectRecord(input)`
|
|
@@ -1325,6 +2191,70 @@ const result = await g8.api.objects.updateObjectRecord({ path: { object_slug: "e
|
|
|
1325
2191
|
|
|
1326
2192
|
---
|
|
1327
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
|
+
|
|
1328
2258
|
<a id="op-upsertobjectrecord"></a>
|
|
1329
2259
|
|
|
1330
2260
|
### `g8.api.objects.upsertObjectRecord(input)`
|
|
@@ -1410,14 +2340,84 @@ Valid attribute types for the Custom Objects type system.
|
|
|
1410
2340
|
|
|
1411
2341
|
Type: `"text" | "number" | "currency" | "date" | "timestamp" | "checkbox" | "select" | "status" | …`.
|
|
1412
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
|
+
|
|
1413
2409
|
<a id="type-recordbulkupdatefailure"></a>
|
|
1414
2410
|
|
|
1415
2411
|
### `RecordBulkUpdateFailure`
|
|
1416
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
|
+
|
|
1417
2415
|
| Field | Type | Required | Description |
|
|
1418
2416
|
|---|---|---|---|
|
|
1419
2417
|
| `error` | `string` | yes | |
|
|
1420
2418
|
| `id` | `string (uuid)` | yes | |
|
|
2419
|
+
| `attribute_slug` | `string \| null` | no | |
|
|
2420
|
+
| `code` | `string` | no | default `"rejected"` |
|
|
1421
2421
|
|
|
1422
2422
|
<a id="type-recordfilter"></a>
|
|
1423
2423
|
|
|
@@ -1541,3 +2541,11 @@ Response for a record with its current attribute values.
|
|
|
1541
2541
|
| `target_label` | `string` | yes | |
|
|
1542
2542
|
| `target_many` | `boolean` | yes | |
|
|
1543
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"`.
|