@graph8/sdk 0.295.2 → 0.303.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,6 +5,6 @@
5
5
  * both together (the version-parity gate already pins package.json, the
6
6
  * lockfile and the CHANGELOG to each other).
7
7
  */
8
- export declare const SDK_VERSION = "0.295.2";
8
+ export declare const SDK_VERSION = "0.303.0";
9
9
  /** Value of the `X-G8-Client` header every SDK request carries (I-13). */
10
- export declare const SDK_CLIENT_ID = "js-sdk/0.295.2";
10
+ export declare const SDK_CLIENT_ID = "js-sdk/0.303.0";
package/docs/agents.md CHANGED
@@ -9,7 +9,7 @@ grows every week and your training data is older than this file.
9
9
 
10
10
  graph8 is a B2B go-to-market platform: CRM (contacts, companies, deals, custom objects), a 700M-person
11
11
  data index with enrichment, intent signals, sequences and campaigns across email/SMS/LinkedIn/voice, a unified
12
- inbox, meetings, workflows and more. This SDK reaches all of it: **3255 Developer API
12
+ inbox, meetings, workflows and more. This SDK reaches all of it: **3264 Developer API
13
13
  operations** in 141 areas.
14
14
 
15
15
  ## 1. The short version
@@ -92,7 +92,7 @@ g8.init({ apiKey: process.env.G8_API_KEY! });
92
92
  | | Hand-written clients | `g8.api` (generated) |
93
93
  |---|---|---|
94
94
  | Example | `g8.contacts.upsert({ list_id, work_email })` | `g8.api.assertUpsert.assertContact({ body: { list_id, work_email } })` |
95
- | Coverage | 289 methods, reaching 258 operations | all 3255 operations |
95
+ | Coverage | 289 methods, reaching 258 operations | all 3264 operations |
96
96
  | Returns | the unwrapped value (usually `data`) | the full envelope; read `result.data` |
97
97
  | Arguments | positional / friendly names | `{ path?, query?, headers?, body? }`, exactly as the contract names them |
98
98
  | Reference | [sdk-clients.md](sdk-clients.md) | [api/README.md](api/README.md) |
@@ -141,7 +141,7 @@ Hand-written modules:
141
141
  | [`g8.webhooks`](sdk-clients.md#g8-webhooks) | 1 | API key |
142
142
  | [`g8.workflows`](sdk-clients.md#g8-workflows) | 21 | API key |
143
143
 
144
- `g8.api` namespaces (operation counts): `accounts` (16), `adCampaigns` (19), `adCreatives` (40), `agency` (24), `agent` (8), `agents` (65), `aiInbox` (79), `analytics` (51), `apiKeys` (6), `appDeployments` (7), `appDomains` (5), `appLogs` (2), `appObjects` (10), `appPages` (16), `appPlatformTokens` (3), `appointments` (92), `apps` (22), `assertUpsert` (6), `audienceSyncs` (8), `brandKit` (30), `bugReports` (7), `calendarInvites` (3), `campaignWorkflows` (5), `campaigns` (29), `channels` (5), `cliCampaigns` (6), `cliPipelines` (12), `clickHouse` (2), `companies` (50), `companyIntelligence` (14), `contacts` (70), `content` (41), `contentGridSkills` (6), `copilot` (39), `crmSyncs` (6), `customerSuccess` (19), `deals` (48), `deliverability` (17), `desk` (71), `dialer` (46), `dialerAnalytics` (6), `documents` (35), `duplicates` (7), `eSign` (1), `eSignature` (7), `enrichment` (115), `events` (1), `fields` (8), `forms` (35), `gtmCampaigns` (22), `gtmContext` (51), `gtmDeliverability` (1), `gtmKnowledgeBase` (2), `gtmLaunchHelpers` (2), `gtmLibrary` (20), `health` (1), `imageLibrary` (14), `imports` (3), `inbox` (22), `install` (6), `installedApps` (4), `integrationStatus` (6), `integrations` (83), `intent` (16), `knowledge` (21), `knowledgeBase` (2), `landingPages` (59), `leads` (4), `library` (9), `linkedIn` (5), `linkedInOutreach` (20), `lists` (36), `logs` (1), `mailboxes` (38), `marketingIntelligence` (10), `marketplace` (142), `mcp` (1), `me` (1), `meetings` (17), `newsletter` (61), `notes` (19), `notifications` (2), `objects` (18), `openSearch` (4), `ops` (5), `orgGovernance` (17), `orgVideos` (6), `organizationSettings` (22), `phoneNumbers` (16), `profile` (14), `programmaticPages` (15), `providerDomains` (34), `providerUsage` (5), `public` (1), `publicCopilot` (1), `publicSignals` (1), `publicVisitors` (2), `quotes` (56), `radar` (42), `radarReports` (8), `recordRoles` (4), `repos` (4), `research` (13), `revenue` (14), `revenueAnalytics` (6), `revenueLifecycle` (5), `revenueRecords` (15), `roles` (21), `salesCoach` (37), `sandbox` (9), `scans` (2), `scheduleBuy` (9), `scraping` (10), `sdrAnalytics` (5), `search` (19), `seo` (11), `sequenceLifecycle` (8), `sequences` (71), `settings` (18), `signals` (56), `signatures` (24), `skills` (12), `snippet` (3), `socialPublishing` (22), `studioDocuments` (9), `support` (1), `suppressions` (6), `surveys` (21), `tasks` (25), `teamMembers` (21), `teams` (35), `usage` (9), `visitors` (26), `voice` (187), `webAnalytics` (38), `webChat` (46), `webhooks` (8), `websiteEditor` (12), `work` (59), `workbench` (107), `workflows` (59).
144
+ `g8.api` namespaces (operation counts): `accounts` (16), `adCampaigns` (19), `adCreatives` (40), `agency` (24), `agent` (8), `agents` (65), `aiInbox` (79), `analytics` (51), `apiKeys` (6), `appDeployments` (7), `appDomains` (5), `appLogs` (2), `appObjects` (10), `appPages` (16), `appPlatformTokens` (3), `appointments` (92), `apps` (22), `assertUpsert` (6), `audienceSyncs` (8), `brandKit` (30), `bugReports` (7), `calendarInvites` (3), `campaignWorkflows` (5), `campaigns` (29), `channels` (5), `cliCampaigns` (6), `cliPipelines` (12), `clickHouse` (2), `companies` (50), `companyIntelligence` (14), `contacts` (70), `content` (41), `contentGridSkills` (6), `copilot` (39), `crmSyncs` (6), `customerSuccess` (19), `deals` (48), `deliverability` (17), `desk` (71), `dialer` (46), `dialerAnalytics` (6), `documents` (35), `duplicates` (7), `eSign` (1), `eSignature` (7), `enrichment` (115), `events` (1), `fields` (8), `forms` (35), `gtmCampaigns` (22), `gtmContext` (51), `gtmDeliverability` (1), `gtmKnowledgeBase` (2), `gtmLaunchHelpers` (2), `gtmLibrary` (20), `health` (1), `imageLibrary` (14), `imports` (3), `inbox` (22), `install` (6), `installedApps` (4), `integrationStatus` (6), `integrations` (83), `intent` (16), `knowledge` (21), `knowledgeBase` (2), `landingPages` (59), `leads` (4), `library` (9), `linkedIn` (5), `linkedInOutreach` (20), `lists` (36), `logs` (1), `mailboxes` (38), `marketingIntelligence` (10), `marketplace` (142), `mcp` (1), `me` (1), `meetings` (17), `newsletter` (61), `notes` (19), `notifications` (2), `objects` (24), `openSearch` (4), `ops` (5), `orgGovernance` (17), `orgVideos` (6), `organizationSettings` (22), `phoneNumbers` (16), `profile` (14), `programmaticPages` (15), `providerDomains` (34), `providerUsage` (5), `public` (1), `publicCopilot` (1), `publicSignals` (1), `publicVisitors` (2), `quotes` (56), `radar` (42), `radarReports` (8), `recordRoles` (4), `repos` (4), `research` (13), `revenue` (14), `revenueAnalytics` (6), `revenueLifecycle` (5), `revenueRecords` (15), `roles` (21), `salesCoach` (37), `sandbox` (9), `scans` (2), `scheduleBuy` (9), `scraping` (10), `sdrAnalytics` (5), `search` (19), `seo` (14), `sequenceLifecycle` (8), `sequences` (71), `settings` (18), `signals` (56), `signatures` (24), `skills` (12), `snippet` (3), `socialPublishing` (22), `studioDocuments` (9), `support` (1), `suppressions` (6), `surveys` (21), `tasks` (25), `teamMembers` (21), `teams` (35), `usage` (9), `visitors` (26), `voice` (187), `webAnalytics` (38), `webChat` (46), `webhooks` (8), `websiteEditor` (12), `work` (59), `workbench` (107), `workflows` (59).
145
145
 
146
146
  ## 5. How to find the right call
147
147
 
@@ -196,9 +196,9 @@ Every operation carries a tier:
196
196
 
197
197
  | Tier | What it means | Count |
198
198
  |---|---|---|
199
- | `read` | reads data; safe to call and to retry | 1510 |
200
- | `write` | creates or changes records; the SDK sends an Idempotency-Key and retries transient failures | 811 |
201
- | `destructive` | deletes or archives data; confirm with a human before calling | 300 |
199
+ | `read` | reads data; safe to call and to retry | 1515 |
200
+ | `write` | creates or changes records; the SDK sends an Idempotency-Key and retries transient failures | 814 |
201
+ | `destructive` | deletes or archives data; confirm with a human before calling | 301 |
202
202
  | `billable` | spends credits; the SDK never blindly retries it; confirm cost before bulk use | 383 |
203
203
  | `external` | reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first | 251 |
204
204
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  # `g8.api`: every Developer API operation
4
4
 
5
- `g8.api` is generated from the published OpenAPI contract, so it covers all 3255 operations across 141 namespaces (1510 read, 811 write, 300 destructive, 383 billable, 251 external).
5
+ `g8.api` is generated from the published OpenAPI contract, so it covers all 3264 operations across 141 namespaces (1515 read, 814 write, 301 destructive, 383 billable, 251 external).
6
6
 
7
7
  - Found a REST path in a curl example or the web docs? Look it up in [by-path.md](by-path.md).
8
8
  - Prefer a hand-written method where one exists: [../sdk-clients.md](../sdk-clients.md).
@@ -104,7 +104,7 @@
104
104
  | `g8.api.newsletter` | Newsletter | 61 | 15 | [newsletter.md](newsletter.md) | [newsletter.d.ts](newsletter.d.ts) |
105
105
  | `g8.api.notes` | Notes | 19 | 8 | [notes.md](notes.md) | [notes.d.ts](notes.d.ts) |
106
106
  | `g8.api.notifications` | Notifications | 2 | none | [notifications.md](notifications.md) | [notifications.d.ts](notifications.d.ts) |
107
- | `g8.api.objects` | Objects | 18 | 18 | [objects.md](objects.md) | [objects.d.ts](objects.d.ts) |
107
+ | `g8.api.objects` | Objects | 24 | 18 | [objects.md](objects.md) | [objects.d.ts](objects.d.ts) |
108
108
  | `g8.api.openSearch` | OpenSearch | 4 | none | [openSearch.md](openSearch.md) | [openSearch.d.ts](openSearch.d.ts) |
109
109
  | `g8.api.ops` | Ops (internal, cross-tenant, read-only) | 5 | none | [ops.md](ops.md) | [ops.d.ts](ops.d.ts) |
110
110
  | `g8.api.orgGovernance` | Org Governance | 17 | none | [orgGovernance.md](orgGovernance.md) | [orgGovernance.d.ts](orgGovernance.d.ts) |
@@ -137,7 +137,7 @@
137
137
  | `g8.api.scraping` | Scraping | 10 | none | [scraping.md](scraping.md) | [scraping.d.ts](scraping.d.ts) |
138
138
  | `g8.api.sdrAnalytics` | SDR Analytics | 5 | none | [sdrAnalytics.md](sdrAnalytics.md) | [sdrAnalytics.d.ts](sdrAnalytics.d.ts) |
139
139
  | `g8.api.search` | Search | 19 | 4 | [search.md](search.md) | [search.d.ts](search.d.ts) |
140
- | `g8.api.seo` | SEO | 11 | none | [seo.md](seo.md) | [seo.d.ts](seo.d.ts) |
140
+ | `g8.api.seo` | SEO | 14 | none | [seo.md](seo.md) | [seo.d.ts](seo.d.ts) |
141
141
  | `g8.api.sequenceLifecycle` | Sequence Lifecycle | 8 | 6 | [sequenceLifecycle.md](sequenceLifecycle.md) | [sequenceLifecycle.d.ts](sequenceLifecycle.d.ts) |
142
142
  | `g8.api.sequences` | Sequences | 71 | 6 | [sequences.md](sequences.md) | [sequences.d.ts](sequences.d.ts) |
143
143
  | `g8.api.settings` | Settings | 18 | none | [settings.md](settings.md) | [settings.d.ts](settings.d.ts) |
@@ -2024,13 +2024,19 @@ Every Developer API route, sorted by path, with the SDK call that reaches it. Th
2024
2024
  | PATCH | `/api/v1/objects/{object_slug}/attributes/{attr_slug}` | [`g8.api.objects.updateAttribute`](objects.md#op-updateattribute) or `g8.objects.updateAttribute()` | write |
2025
2025
  | GET | `/api/v1/objects/{object_slug}/records` | [`g8.api.objects.listObjectRecords`](objects.md#op-listobjectrecords) or `g8.objects.listRecords()` | read |
2026
2026
  | POST | `/api/v1/objects/{object_slug}/records` | [`g8.api.objects.createObjectRecord`](objects.md#op-createobjectrecord) or `g8.objects.createRecord()` | write |
2027
+ | PATCH | `/api/v1/objects/{object_slug}/records/bulk` | [`g8.api.objects.bulkUpdateObjectRecords`](objects.md#op-bulkupdateobjectrecords) | write |
2028
+ | POST | `/api/v1/objects/{object_slug}/records/merge` | [`g8.api.objects.mergeObjectRecords`](objects.md#op-mergeobjectrecords) | write |
2027
2029
  | POST | `/api/v1/objects/{object_slug}/records/upsert` | [`g8.api.objects.upsertObjectRecord`](objects.md#op-upsertobjectrecord) or `g8.objects.upsertRecord()` | write |
2028
2030
  | DELETE | `/api/v1/objects/{object_slug}/records/{record_id}` | [`g8.api.objects.archiveObjectRecord`](objects.md#op-archiveobjectrecord) or `g8.objects.archiveRecord()` | destructive |
2029
2031
  | GET | `/api/v1/objects/{object_slug}/records/{record_id}` | [`g8.api.objects.getObjectRecord`](objects.md#op-getobjectrecord) or `g8.objects.getRecord()` | read |
2030
2032
  | PATCH | `/api/v1/objects/{object_slug}/records/{record_id}` | [`g8.api.objects.updateObjectRecord`](objects.md#op-updateobjectrecord) or `g8.objects.updateRecord()` | write |
2031
2033
  | GET | `/api/v1/objects/{object_slug}/records/{record_id}/changes` | [`g8.api.objects.getObjectRecordChanges`](objects.md#op-getobjectrecordchanges) or `g8.objects.changes()` | read |
2032
2034
  | GET | `/api/v1/objects/{object_slug}/records/{record_id}/history` | [`g8.api.objects.getObjectRecordHistory`](objects.md#op-getobjectrecordhistory) or `g8.objects.history()` | read |
2035
+ | GET | `/api/v1/objects/{object_slug}/records/{record_id}/relationships` | [`g8.api.objects.getObjectRelationships`](objects.md#op-getobjectrelationships) | read |
2036
+ | POST | `/api/v1/objects/{object_slug}/records/{record_id}/relationships` | [`g8.api.objects.createObjectRelationship`](objects.md#op-createobjectrelationship) | write |
2037
+ | DELETE | `/api/v1/objects/{object_slug}/records/{record_id}/relationships/{relationship_id}` | [`g8.api.objects.deleteObjectRelationship`](objects.md#op-deleteobjectrelationship) | destructive |
2033
2038
  | POST | `/api/v1/objects/{object_slug}/records/{record_id}/restore` | [`g8.api.objects.restoreObjectRecord`](objects.md#op-restoreobjectrecord) or `g8.objects.restoreRecord()` | write |
2039
+ | GET | `/api/v1/objects/{object_slug}/relationships` | [`g8.api.objects.getObjectRelationshipDefinitions`](objects.md#op-getobjectrelationshipdefinitions) | read |
2034
2040
  | POST | `/api/v1/opensearch/aggregate` | [`g8.api.openSearch.opensearchAggregate`](openSearch.md#op-opensearchaggregate) | write |
2035
2041
  | POST | `/api/v1/opensearch/count` | [`g8.api.openSearch.opensearchCount`](openSearch.md#op-opensearchcount) | write |
2036
2042
  | POST | `/api/v1/opensearch/resolve` | [`g8.api.openSearch.opensearchResolve`](openSearch.md#op-opensearchresolve) | write |
@@ -2466,6 +2472,9 @@ Every Developer API route, sorted by path, with the SDK call that reaches it. Th
2466
2472
  | POST | `/api/v1/seo/audits` | [`g8.api.seo.startSeoAudit`](seo.md#op-startseoaudit) | billable |
2467
2473
  | GET | `/api/v1/seo/audits/{audit_id}` | [`g8.api.seo.getSeoAudit`](seo.md#op-getseoaudit) | read |
2468
2474
  | GET | `/api/v1/seo/audits/{audit_id}/issues` | [`g8.api.seo.getSeoAuditIssues`](seo.md#op-getseoauditissues) | read |
2475
+ | GET | `/api/v1/seo/domains/tracked` | [`g8.api.seo.listSeoTrackedDomains`](seo.md#op-listseotrackeddomains) | read |
2476
+ | GET | `/api/v1/seo/domains/tracked/{domain}` | [`g8.api.seo.getSeoTrackedDomain`](seo.md#op-getseotrackeddomain) | read |
2477
+ | GET | `/api/v1/seo/domains/tracked/{domain}/pages` | [`g8.api.seo.listSeoDomainPages`](seo.md#op-listseodomainpages) | read |
2469
2478
  | GET | `/api/v1/seo/domains/{domain}/backlinks` | [`g8.api.seo.getSeoDomainBacklinks`](seo.md#op-getseodomainbacklinks) | billable |
2470
2479
  | GET | `/api/v1/seo/domains/{domain}/overview` | [`g8.api.seo.getSeoDomainOverview`](seo.md#op-getseodomainoverview) | billable |
2471
2480
  | POST | `/api/v1/seo/keywords/research` | [`g8.api.seo.researchSeoKeywords`](seo.md#op-researchseokeywords) | billable |
@@ -1074,6 +1074,13 @@ export interface Column {
1074
1074
  id?: number | null;
1075
1075
  /** Automatically computed: True if object_id is None/empty, False otherwise. */
1076
1076
  is_global: boolean;
1077
+ /**
1078
+ * Human-readable display name (CF-09), e.g. ``CONTACT_FIRST_NAME`` ->
1079
+ * "First name", ``COMPANY_NAICS`` -> "Company NAICS". Custom columns keep
1080
+ * their own title. Additive and read-only: ``name`` / ``title`` stay the
1081
+ * storage key, because callers send them back as identifiers.
1082
+ */
1083
+ label: string | null;
1077
1084
  name?: string | null;
1078
1085
  object_id?: string | null;
1079
1086
  source?: ColumnSource;
@@ -1479,6 +1479,7 @@ Other envelope fields: `pagination` (PaginationMeta).
1479
1479
  | Field | Type | Required | Description |
1480
1480
  |---|---|---|---|
1481
1481
  | `is_global` | `boolean` | yes | Automatically computed: True if object_id is None/empty, False otherwise. |
1482
+ | `label` | `string \| null` | yes | Human-readable display name (CF-09), e.g. ``CONTACT_FIRST_NAME`` -> "First name", ``COMPANY_NAICS`` -> "Company NAICS". Custom columns keep their own title. Additive and read-only: ``name`` / ``title`` stay the storage key, because callers send them back as identifiers. |
1482
1483
  | `title` | `string` | yes | |
1483
1484
  | `data_type` | `ColumnType` | no | default `"text"` |
1484
1485
  | `id` | `integer \| null` | no | |
@@ -1422,6 +1422,13 @@ export interface Column {
1422
1422
  id?: number | null;
1423
1423
  /** Automatically computed: True if object_id is None/empty, False otherwise. */
1424
1424
  is_global: boolean;
1425
+ /**
1426
+ * Human-readable display name (CF-09), e.g. ``CONTACT_FIRST_NAME`` ->
1427
+ * "First name", ``COMPANY_NAICS`` -> "Company NAICS". Custom columns keep
1428
+ * their own title. Additive and read-only: ``name`` / ``title`` stay the
1429
+ * storage key, because callers send them back as identifiers.
1430
+ */
1431
+ label: string | null;
1425
1432
  name?: string | null;
1426
1433
  object_id?: string | null;
1427
1434
  source?: ColumnSource;
@@ -1772,6 +1772,7 @@ Other envelope fields: `pagination` (PaginationMeta).
1772
1772
  | Field | Type | Required | Description |
1773
1773
  |---|---|---|---|
1774
1774
  | `is_global` | `boolean` | yes | Automatically computed: True if object_id is None/empty, False otherwise. |
1775
+ | `label` | `string \| null` | yes | Human-readable display name (CF-09), e.g. ``CONTACT_FIRST_NAME`` -> "First name", ``COMPANY_NAICS`` -> "Company NAICS". Custom columns keep their own title. Additive and read-only: ``name`` / ``title`` stay the storage key, because callers send them back as identifiers. |
1775
1776
  | `title` | `string` | yes | |
1776
1777
  | `data_type` | `ColumnType` | no | default `"text"` |
1777
1778
  | `id` | `integer \| null` | no | |
@@ -2618,16 +2618,24 @@ export interface EnrichmentPreflightResponse {
2618
2618
  contact_count: number;
2619
2619
  /** Contact IDs that will be enriched: duplicates removed, order kept */
2620
2620
  contact_ids: Array<number>;
2621
+ /** Waterfall only: the most one contact can cost, in graph8 credits. A record is charged its dearest graph8-funded step that finds a value (steps are not added together); steps on your own key cost 0. Null when the pipeline could not be priced. */
2622
+ credits_per_record?: number | null;
2621
2623
  /** How many repeated contact IDs were dropped */
2622
2624
  duplicates_removed?: number;
2623
2625
  list_id: number;
2624
2626
  list_name?: string | null;
2627
+ /** Waterfall only: priced_records x credits_per_record, the most this run can charge. Records the pipeline skips (values already present, run conditions) cost less. Null when not priced. */
2628
+ max_total_credits?: number | null;
2625
2629
  /** Providers whose step would be skipped because the org has no key for them */
2626
2630
  missing_credentials?: Array<string>;
2627
2631
  /** Resolved mode: 'waterfall' or 'ai-research' */
2628
2632
  mode: string;
2629
2633
  /** Contact IDs that are not on the list; the run skips them and does not charge for them */
2630
2634
  not_in_list?: Array<number>;
2635
+ /** column_id of the saved waterfall pipeline the run would reuse. Null when the run would create a new pipeline (it is created on confirm) or in 'ai-research' mode. Pass it to POST /enrichment/waterfall/validate-credits for the record-exact quote. */
2636
+ pipeline_column_id?: string | null;
2637
+ /** Waterfall only: contacts the price covers (unique contacts that are on the list). */
2638
+ priced_records?: number | null;
2631
2639
  /** Providers that would run, in order (empty = the saved pipeline) */
2632
2640
  providers?: Array<string>;
2633
2641
  providers_detail?: Array<ProviderStepDetail>;
@@ -3312,10 +3312,14 @@ Other envelope fields: `pagination` (PaginationMeta).
3312
3312
  | `contact_ids` | `Array<integer>` | yes | Contact IDs that will be enriched: duplicates removed, order kept |
3313
3313
  | `list_id` | `integer` | yes | |
3314
3314
  | `mode` | `string` | yes | Resolved mode: 'waterfall' or 'ai-research' |
3315
+ | `credits_per_record` | `integer \| null` | no | Waterfall only: the most one contact can cost, in graph8 credits. A record is charged its dearest graph8-funded step that finds a value (steps are not added together); steps on your own key cost 0. Null when the pipeline could not be priced. |
3315
3316
  | `duplicates_removed` | `integer` | no | How many repeated contact IDs were dropped default `0` |
3316
3317
  | `list_name` | `string \| null` | no | |
3318
+ | `max_total_credits` | `integer \| null` | no | Waterfall only: priced_records x credits_per_record, the most this run can charge. Records the pipeline skips (values already present, run conditions) cost less. Null when not priced. |
3317
3319
  | `missing_credentials` | `Array<string>` | no | Providers whose step would be skipped because the org has no key for them |
3318
3320
  | `not_in_list` | `Array<integer>` | no | Contact IDs that are not on the list; the run skips them and does not charge for them |
3321
+ | `pipeline_column_id` | `string \| null` | no | column_id of the saved waterfall pipeline the run would reuse. Null when the run would create a new pipeline (it is created on confirm) or in 'ai-research' mode. Pass it to POST /enrichment/waterfall/validate-credits for the record-exact quote. |
3322
+ | `priced_records` | `integer \| null` | no | Waterfall only: contacts the price covers (unique contacts that are on the list). |
3319
3323
  | `providers` | `Array<string>` | no | Providers that would run, in order (empty = the saved pipeline) |
3320
3324
  | `providers_detail` | `Array<ProviderStepDetail>` | no | |
3321
3325
  | `target_field` | `string \| null` | no | Canonical column for target_field, when given |
@@ -469,6 +469,8 @@ export interface ListsOperations {
469
469
  page?: number;
470
470
  /** Items per page (max 200) */
471
471
  limit?: number;
472
+ /** Case-insensitive substring match on the list title. Omit for every list. */
473
+ search?: string | null;
472
474
  };
473
475
  headers?: {
474
476
  "X-Target-Org-Id"?: string | null;
@@ -1016,6 +1018,10 @@ export interface ListResponse {
1016
1018
  /** Source of the list */
1017
1019
  source?: string | null;
1018
1020
  status?: string | null;
1021
+ /** Human-readable explanation of status_reason. */
1022
+ status_detail?: string | null;
1023
+ /** Why the list is not usable, or null when it is fine: 'import_failed' (a file import raised; status_detail carries the reason when known), 'import_not_finished' (an uploaded list still processing with no records an hour after it was created: the import never ran) or 'build_failed' (a list built another way, e.g. from Search, failed; re-run it from its source). */
1024
+ status_reason?: string | null;
1019
1025
  tags?: Array<string>;
1020
1026
  title: string;
1021
1027
  total?: number;
package/docs/api/lists.md CHANGED
@@ -1063,7 +1063,7 @@ const result = await g8.api.lists.listListFolders();
1063
1063
  - API-key scope: `lists:read`
1064
1064
  - ★ Hand-written: [`g8.lists.list()`](../sdk-clients.md#g8-lists-list)
1065
1065
 
1066
- List all lists (audiences) in the organization.
1066
+ List all lists (audiences) in the organization, optionally filtered by title.
1067
1067
 
1068
1068
  **Input**
1069
1069
 
@@ -1071,6 +1071,7 @@ List all lists (audiences) in the organization.
1071
1071
  |---|---|---|---|
1072
1072
  | `query.page` | `integer` | no | Page number (1-indexed) default `1` |
1073
1073
  | `query.limit` | `integer` | no | Items per page (max 200) default `50` |
1074
+ | `query.search` | `string \| null` | no | Case-insensitive substring match on the list title. Omit for every list. |
1074
1075
 
1075
1076
  **Returns** `ApiResponse_list_ListResponse__`: the envelope `{ data: Array<ListResponse>, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1076
1077
 
@@ -1090,6 +1091,8 @@ Other envelope fields: `pagination` (PaginationMeta).
1090
1091
  | `is_dynamic` | `boolean` | no | default `false` |
1091
1092
  | `source` | `string \| null` | no | Source of the list |
1092
1093
  | `status` | `string \| null` | no | |
1094
+ | `status_detail` | `string \| null` | no | Human-readable explanation of status_reason. |
1095
+ | `status_reason` | `string \| null` | no | Why the list is not usable, or null when it is fine: 'import_failed' (a file import raised; status_detail carries the reason when known), 'import_not_finished' (an uploaded list still processing with no records an hour after it was created: the import never ran) or 'build_failed' (a list built another way, e.g. from Search, failed; re-run it from its source). |
1093
1096
  | `tags` | `Array<string>` | no | |
1094
1097
  | `total` | `integer` | no | default `0` |
1095
1098
  | `type` | `string \| null` | no | List type (contacts, companies, suppressions, deals, leads) |
@@ -1504,6 +1507,8 @@ Other envelope fields: `pagination` (PaginationMeta).
1504
1507
  | `is_dynamic` | `boolean` | no | default `false` |
1505
1508
  | `source` | `string \| null` | no | Source of the list |
1506
1509
  | `status` | `string \| null` | no | |
1510
+ | `status_detail` | `string \| null` | no | Human-readable explanation of status_reason. |
1511
+ | `status_reason` | `string \| null` | no | Why the list is not usable, or null when it is fine: 'import_failed' (a file import raised; status_detail carries the reason when known), 'import_not_finished' (an uploaded list still processing with no records an hour after it was created: the import never ran) or 'build_failed' (a list built another way, e.g. from Search, failed; re-run it from its source). |
1507
1512
  | `tags` | `Array<string>` | no | |
1508
1513
  | `total` | `integer` | no | default `0` |
1509
1514
  | `type` | `string \| null` | no | List type (contacts, companies, suppressions, deals, leads) |
@@ -1,7 +1,7 @@
1
1
  /* Generated by sdk/js/scripts/generate-agent-docs.ts from developer-contract/openapi.json. Regenerated on every build. */
2
2
 
3
3
  /**
4
- * Types for `g8.api.objects` (Objects): 18 operations.
4
+ * Types for `g8.api.objects` (Objects): 24 operations.
5
5
  *
6
6
  * For reading. In code, import from the package instead:
7
7
  * import type { ApiInput, ApiOutput, G8Contract } from "@graph8/sdk";
@@ -16,16 +16,22 @@ export interface ObjectsMembers {
16
16
  archiveAttribute: "archive_attribute_objects__object_slug__attributes__attr_slug__delete";
17
17
  archiveObject: "archive_object_objects__object_slug__delete";
18
18
  archiveObjectRecord: "archive_object_record_objects__object_slug__records__record_id__delete";
19
+ bulkUpdateObjectRecords: "bulk_update_object_records_objects__object_slug__records_bulk_patch";
19
20
  createAttribute: "create_attribute_objects__object_slug__attributes_post";
20
21
  createObject: "create_object_objects_post";
21
22
  createObjectRecord: "create_object_record_objects__object_slug__records_post";
23
+ createObjectRelationship: "create_object_relationship_objects__object_slug__records__record_id__relationships_post";
24
+ deleteObjectRelationship: "delete_object_relationship_objects__object_slug__records__record_id__relationships__relationship_id__delete";
22
25
  getObject: "get_object_objects__object_slug__get";
23
26
  getObjectRecord: "get_object_record_objects__object_slug__records__record_id__get";
24
27
  getObjectRecordChanges: "get_object_record_changes_objects__object_slug__records__record_id__changes_get";
25
28
  getObjectRecordHistory: "get_object_record_history_objects__object_slug__records__record_id__history_get";
29
+ getObjectRelationshipDefinitions: "get_object_relationship_definitions_objects__object_slug__relationships_get";
30
+ getObjectRelationships: "get_object_relationships_objects__object_slug__records__record_id__relationships_get";
26
31
  listObjectAttributes: "list_object_attributes_objects__object_slug__attributes_get";
27
32
  listObjectRecords: "list_object_records_objects__object_slug__records_get";
28
33
  listObjects: "list_objects_objects_get";
34
+ mergeObjectRecords: "merge_object_records_objects__object_slug__records_merge_post";
29
35
  restoreObjectRecord: "restore_object_record_objects__object_slug__records__record_id__restore_post";
30
36
  updateAttribute: "update_attribute_objects__object_slug__attributes__attr_slug__patch";
31
37
  updateObject: "update_object_objects__object_slug__patch";
@@ -85,6 +91,23 @@ export interface ObjectsOperations {
85
91
  };
86
92
  output: ApiResponse_ObjectRecordResponse_;
87
93
  };
94
+ /**
95
+ * PATCH /objects/{object_slug}/records/bulk
96
+ * Bulk Update Object Records
97
+ * tier: write · scope: objects:write
98
+ */
99
+ bulk_update_object_records_objects__object_slug__records_bulk_patch: {
100
+ input: {
101
+ path: {
102
+ object_slug: string;
103
+ };
104
+ headers?: {
105
+ "X-Target-Org-Id"?: string | null;
106
+ };
107
+ body: RecordBulkUpdate;
108
+ };
109
+ output: ApiResponse_RecordBulkUpdateResponse_;
110
+ };
88
111
  /**
89
112
  * POST /objects/{object_slug}/attributes
90
113
  * Create Attribute
@@ -133,6 +156,43 @@ export interface ObjectsOperations {
133
156
  };
134
157
  output: ApiResponse_ObjectRecordResponse_;
135
158
  };
159
+ /**
160
+ * POST /objects/{object_slug}/records/{record_id}/relationships
161
+ * Create Object Relationship
162
+ * tier: write · scope: objects:write
163
+ */
164
+ create_object_relationship_objects__object_slug__records__record_id__relationships_post: {
165
+ input: {
166
+ path: {
167
+ object_slug: string;
168
+ record_id: string;
169
+ };
170
+ headers?: {
171
+ "X-Target-Org-Id"?: string | null;
172
+ };
173
+ body: RelationshipCreate;
174
+ };
175
+ output: ApiResponse_RelationshipResponse_;
176
+ };
177
+ /**
178
+ * DELETE /objects/{object_slug}/records/{record_id}/relationships/{relationship_id}
179
+ * Delete Object Relationship
180
+ * tier: destructive · scope: objects:write
181
+ */
182
+ delete_object_relationship_objects__object_slug__records__record_id__relationships__relationship_id__delete: {
183
+ input: {
184
+ path: {
185
+ object_slug: string;
186
+ record_id: string;
187
+ relationship_id: string;
188
+ };
189
+ headers?: {
190
+ "X-Target-Org-Id"?: string | null;
191
+ };
192
+ body: RelationshipCreate;
193
+ };
194
+ output: ApiResponse_RelationshipResponse_;
195
+ };
136
196
  /**
137
197
  * GET /objects/{object_slug}
138
198
  * Get Object
@@ -208,6 +268,47 @@ export interface ObjectsOperations {
208
268
  };
209
269
  output: ApiResponse_RecordHistoryResponse_;
210
270
  };
271
+ /**
272
+ * GET /objects/{object_slug}/relationships
273
+ * Get Object Relationship Definitions
274
+ * tier: read · scope: objects:read
275
+ */
276
+ get_object_relationship_definitions_objects__object_slug__relationships_get: {
277
+ input: {
278
+ path: {
279
+ object_slug: string;
280
+ };
281
+ query?: {
282
+ limit?: number;
283
+ offset?: number;
284
+ };
285
+ headers?: {
286
+ "X-Target-Org-Id"?: string | null;
287
+ };
288
+ };
289
+ output: ApiResponse_RelationshipDefinitionListResponse_;
290
+ };
291
+ /**
292
+ * GET /objects/{object_slug}/records/{record_id}/relationships
293
+ * Get Object Relationships
294
+ * tier: read · scope: objects:read
295
+ */
296
+ get_object_relationships_objects__object_slug__records__record_id__relationships_get: {
297
+ input: {
298
+ path: {
299
+ object_slug: string;
300
+ record_id: string;
301
+ };
302
+ query?: {
303
+ limit?: number;
304
+ offset?: number;
305
+ };
306
+ headers?: {
307
+ "X-Target-Org-Id"?: string | null;
308
+ };
309
+ };
310
+ output: ApiResponse_RecordRelationshipsResponse_;
311
+ };
211
312
  /**
212
313
  * GET /objects/{object_slug}/attributes
213
314
  * List Object Attributes
@@ -267,6 +368,23 @@ export interface ObjectsOperations {
267
368
  };
268
369
  output: ApiResponse_list_ObjectDefinitionResponse__;
269
370
  };
371
+ /**
372
+ * POST /objects/{object_slug}/records/merge
373
+ * Merge Object Records
374
+ * tier: write · scope: objects:write
375
+ */
376
+ merge_object_records_objects__object_slug__records_merge_post: {
377
+ input: {
378
+ path: {
379
+ object_slug: string;
380
+ };
381
+ headers?: {
382
+ "X-Target-Org-Id"?: string | null;
383
+ };
384
+ body: RecordMergeRequest;
385
+ };
386
+ output: ApiResponse_RecordMergeResponse_;
387
+ };
270
388
  /**
271
389
  * POST /objects/{object_slug}/records/{record_id}/restore
272
390
  * Restore Object Record
@@ -356,7 +474,7 @@ export interface ObjectsOperations {
356
474
  };
357
475
  }
358
476
 
359
- // 26 schemas referenced above (the same as G8Contract.<Name>).
477
+ // 46 schemas referenced above (the same as G8Contract.<Name>).
360
478
 
361
479
  export interface ApiResponse_AttributeDefinitionResponse_ {
362
480
  data: AttributeDefinitionResponse;
@@ -373,16 +491,41 @@ export interface ApiResponse_ObjectRecordResponse_ {
373
491
  pagination?: PaginationMeta | null;
374
492
  }
375
493
 
494
+ export interface ApiResponse_RecordBulkUpdateResponse_ {
495
+ data: RecordBulkUpdateResponse;
496
+ pagination?: PaginationMeta | null;
497
+ }
498
+
376
499
  export interface ApiResponse_RecordHistoryResponse_ {
377
500
  data: RecordHistoryResponse;
378
501
  pagination?: PaginationMeta | null;
379
502
  }
380
503
 
504
+ export interface ApiResponse_RecordMergeResponse_ {
505
+ data: RecordMergeResponse;
506
+ pagination?: PaginationMeta | null;
507
+ }
508
+
381
509
  export interface ApiResponse_RecordMutationsResponse_ {
382
510
  data: RecordMutationsResponse;
383
511
  pagination?: PaginationMeta | null;
384
512
  }
385
513
 
514
+ export interface ApiResponse_RecordRelationshipsResponse_ {
515
+ data: RecordRelationshipsResponse;
516
+ pagination?: PaginationMeta | null;
517
+ }
518
+
519
+ export interface ApiResponse_RelationshipDefinitionListResponse_ {
520
+ data: RelationshipDefinitionListResponse;
521
+ pagination?: PaginationMeta | null;
522
+ }
523
+
524
+ export interface ApiResponse_RelationshipResponse_ {
525
+ data: RelationshipResponse;
526
+ pagination?: PaginationMeta | null;
527
+ }
528
+
386
529
  export interface ApiResponse_list_AttributeDefinitionResponse__ {
387
530
  data: Array<AttributeDefinitionResponse>;
388
531
  pagination?: PaginationMeta | null;
@@ -539,6 +682,42 @@ export interface PaginationMeta {
539
682
  total_is_lower_bound?: boolean | null;
540
683
  }
541
684
 
685
+ /**
686
+ * Bulk-update body: exactly one scope (explicit ids or a filtered set),
687
+ * plus the values to apply to every record in that scope.
688
+ *
689
+ * ``record_ids`` is capped at 500 to bound the transaction. ``filters`` reuses
690
+ * this router's own ``RecordFilter`` shape; a filtered scope is resolved
691
+ * entirely server-side (ordered by record id, at most 500 per call) and the
692
+ * ids it resolves are never trusted from the client. ``after_record_id``
693
+ * continues a filtered scope that the previous call reported as truncated.
694
+ */
695
+ export interface RecordBulkUpdate {
696
+ after_record_id?: string | null;
697
+ filters?: Array<RecordFilter> | null;
698
+ record_ids?: Array<string> | null;
699
+ values?: Record<string, unknown>;
700
+ }
701
+
702
+ export interface RecordBulkUpdateFailure {
703
+ error: string;
704
+ id: string;
705
+ }
706
+
707
+ export interface RecordBulkUpdateResponse {
708
+ failed: Array<RecordBulkUpdateFailure>;
709
+ next_after_record_id?: string | null;
710
+ succeeded: Array<string>;
711
+ truncated?: boolean;
712
+ }
713
+
714
+ /** Filter parameters for listing records. */
715
+ export interface RecordFilter {
716
+ attribute_slug: string;
717
+ operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "starts_with" | "is_null" | "is_not_null";
718
+ value?: unknown | null;
719
+ }
720
+
542
721
  /**
543
722
  * One generation of one attribute's value.
544
723
  *
@@ -566,6 +745,37 @@ export interface RecordHistoryResponse {
566
745
  record_id: string;
567
746
  }
568
747
 
748
+ export interface RecordMergeCascade {
749
+ associations_deleted: number;
750
+ associations_repointed: number;
751
+ relationships_deleted: number;
752
+ relationships_repointed: number;
753
+ }
754
+
755
+ export interface RecordMergeFieldOverride {
756
+ attribute_slug: string;
757
+ winner: "primary" | "secondary";
758
+ }
759
+
760
+ /**
761
+ * Merge ``secondary_record_id`` into ``primary_record_id``. The primary's
762
+ * graph8 identity (id, legacy_id/legacy_type) is preserved; the secondary is
763
+ * archived, never hard-deleted.
764
+ */
765
+ export interface RecordMergeRequest {
766
+ expected_primary_revision?: number | null;
767
+ expected_secondary_revision?: number | null;
768
+ field_overrides?: Array<RecordMergeFieldOverride>;
769
+ primary_record_id: string;
770
+ secondary_record_id: string;
771
+ }
772
+
773
+ export interface RecordMergeResponse {
774
+ cascade: RecordMergeCascade;
775
+ merge_history_id: string;
776
+ record: RecordResponse;
777
+ }
778
+
569
779
  export interface RecordMutationEntry {
570
780
  action: "created" | "updated" | "archived" | "restored";
571
781
  actor_id: string | null;
@@ -594,6 +804,24 @@ export interface RecordMutationsResponse {
594
804
  record_id: string;
595
805
  }
596
806
 
807
+ export interface RecordRelationshipsResponse {
808
+ /** Next visible page offset; null at the end */
809
+ next_offset: number | null;
810
+ relationships: Array<RelatedRecordEdge>;
811
+ }
812
+
813
+ /** Response for a record with its current attribute values. */
814
+ export interface RecordResponse {
815
+ created_at: string;
816
+ id: string;
817
+ is_archived: boolean;
818
+ object_definition_id: string;
819
+ organization_id: string;
820
+ revision?: number;
821
+ updated_at: string;
822
+ values: Record<string, unknown>;
823
+ }
824
+
597
825
  export interface RecordUpdateRequest {
598
826
  /** Append canonical non-duplicate values to multivalue fields. Fields must not overlap values or remove_values. */
599
827
  append_values?: Record<string, Array<unknown>>;
@@ -625,3 +853,61 @@ export interface RecordWriteRequest {
625
853
  /** Attribute values keyed by slug. Call `GET /objects/{object_slug}/attributes` for active fields. Canonical contacts and companies retain CONTACT_*, COMPANY_* and udo_* field names. Unknown keys are rejected with 422. PATCH preserves omitted fields; required fields cannot be cleared with null or an empty multivalue list. Record references must resolve to active records of their configured target object in the same organization and app. */
626
854
  values?: Record<string, unknown>;
627
855
  }
856
+
857
+ export interface RelatedRecordEdge {
858
+ can_unlink: boolean;
859
+ definition_id: string;
860
+ definition_revision: number;
861
+ id: string;
862
+ relationship_label: string;
863
+ source_kind: "custom" | "contacts" | "companies" | "deals";
864
+ source_label: string | null;
865
+ source_object_slug: string;
866
+ source_record_id: string;
867
+ source_revision: number;
868
+ target_kind: "custom" | "contacts" | "companies" | "deals";
869
+ target_label: string | null;
870
+ target_object_slug: string;
871
+ target_record_id: string;
872
+ target_revision: number;
873
+ }
874
+
875
+ export interface RelationshipCreate {
876
+ definition_id: string;
877
+ expected_definition_revision: number;
878
+ expected_source_revision: number;
879
+ expected_target_revision: number;
880
+ target_record_id: string;
881
+ }
882
+
883
+ export interface RelationshipDefinitionListResponse {
884
+ relationships: Array<RelationshipDefinitionResponse>;
885
+ total: number;
886
+ }
887
+
888
+ export interface RelationshipDefinitionResponse {
889
+ api_slug: string;
890
+ created_at: string;
891
+ id: string;
892
+ is_archived: boolean;
893
+ revision: number;
894
+ source_kind: string;
895
+ source_label: string;
896
+ source_many: boolean;
897
+ source_object_definition_id: string | null;
898
+ target_kind: string;
899
+ target_label: string;
900
+ target_many: boolean;
901
+ target_object_definition_id: string | null;
902
+ }
903
+
904
+ export interface RelationshipResponse {
905
+ definition_id: string;
906
+ id: string;
907
+ source_kind: string;
908
+ source_record_id: string;
909
+ source_revision: number;
910
+ target_kind: string;
911
+ target_record_id: string;
912
+ target_revision: number;
913
+ }