@graph8/sdk 0.265.0 → 0.293.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.
- package/README.md +3 -3
- package/dist/index.d.mts +734 -28
- package/dist/index.d.ts +734 -28
- package/dist/index.js +15 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +15 -5
- package/dist/index.mjs.map +1 -1
- package/dist/react.d.mts +728 -26
- package/dist/react.d.ts +728 -26
- package/dist/react.js +14 -4
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +14 -4
- package/dist/react.mjs.map +1 -1
- package/dist/types/core.d.ts +2 -0
- package/dist/types/enrich.d.ts +11 -4
- package/dist/types/index.d.ts +1 -1
- package/dist/types/react.d.ts +6 -2
- package/dist/types/search.d.ts +25 -1
- package/dist/types/version.d.ts +2 -2
- package/docs/agents.md +8 -7
- package/docs/api/README.md +4 -4
- package/docs/api/accounts.d.ts +6 -0
- package/docs/api/adCampaigns.d.ts +6 -0
- package/docs/api/adCreatives.d.ts +6 -0
- package/docs/api/agency.d.ts +6 -0
- package/docs/api/agent.d.ts +6 -0
- package/docs/api/agents.d.ts +6 -0
- package/docs/api/aiInbox.d.ts +6 -0
- package/docs/api/analytics.d.ts +32 -1
- package/docs/api/analytics.md +2 -0
- package/docs/api/apiKeys.d.ts +6 -0
- package/docs/api/appDeployments.d.ts +6 -0
- package/docs/api/appDomains.d.ts +6 -0
- package/docs/api/appLogs.d.ts +6 -0
- package/docs/api/appObjects.d.ts +6 -0
- package/docs/api/appPages.d.ts +6 -0
- package/docs/api/appPlatformTokens.d.ts +6 -0
- package/docs/api/appointments.d.ts +20 -2
- package/docs/api/appointments.md +27 -11
- package/docs/api/apps.d.ts +6 -0
- package/docs/api/apps.md +7 -5
- package/docs/api/assertUpsert.d.ts +14 -0
- package/docs/api/assertUpsert.md +5 -0
- package/docs/api/audienceSyncs.d.ts +14 -0
- package/docs/api/audienceSyncs.md +16 -0
- package/docs/api/brandKit.d.ts +6 -0
- package/docs/api/bugReports.d.ts +6 -0
- package/docs/api/by-path.md +3 -0
- package/docs/api/calendarInvites.d.ts +6 -0
- package/docs/api/campaignWorkflows.d.ts +6 -0
- package/docs/api/campaigns.d.ts +6 -0
- package/docs/api/channels.d.ts +6 -0
- package/docs/api/cliCampaigns.d.ts +6 -0
- package/docs/api/cliPipelines.d.ts +6 -0
- package/docs/api/clickHouse.d.ts +6 -0
- package/docs/api/companies.d.ts +17 -3
- package/docs/api/companies.md +13 -3
- package/docs/api/companyIntelligence.d.ts +6 -0
- package/docs/api/contacts.d.ts +26 -5
- package/docs/api/contacts.md +17 -6
- package/docs/api/content.d.ts +6 -0
- package/docs/api/contentGridSkills.d.ts +6 -0
- package/docs/api/copilot.d.ts +6 -0
- package/docs/api/crmSyncs.d.ts +6 -0
- package/docs/api/customerSuccess.d.ts +6 -0
- package/docs/api/deals.d.ts +6 -0
- package/docs/api/deliverability.d.ts +6 -0
- package/docs/api/desk.d.ts +6 -0
- package/docs/api/dialer.d.ts +6 -0
- package/docs/api/documents.d.ts +6 -0
- package/docs/api/duplicates.d.ts +6 -0
- package/docs/api/eSignature.d.ts +6 -0
- package/docs/api/enrichment.d.ts +82 -2
- package/docs/api/enrichment.md +76 -1
- package/docs/api/events.d.ts +6 -0
- package/docs/api/fields.d.ts +30 -3
- package/docs/api/fields.md +15 -4
- package/docs/api/forms.d.ts +6 -0
- package/docs/api/gtmCampaigns.d.ts +6 -0
- package/docs/api/gtmContext.d.ts +6 -0
- package/docs/api/gtmDeliverability.d.ts +6 -0
- package/docs/api/gtmKnowledgeBase.d.ts +6 -0
- package/docs/api/gtmLibrary.d.ts +6 -0
- package/docs/api/imageLibrary.d.ts +6 -0
- package/docs/api/imports.d.ts +6 -0
- package/docs/api/inbox.d.ts +6 -0
- package/docs/api/install.d.ts +32 -0
- package/docs/api/install.md +18 -0
- package/docs/api/installedApps.d.ts +6 -0
- package/docs/api/integrationStatus.d.ts +6 -0
- package/docs/api/integrations.d.ts +6 -0
- package/docs/api/intent.d.ts +32 -1
- package/docs/api/intent.md +23 -0
- package/docs/api/knowledge.d.ts +6 -0
- package/docs/api/knowledgeBase.d.ts +6 -0
- package/docs/api/landingPages.d.ts +6 -0
- package/docs/api/leads.d.ts +6 -0
- package/docs/api/library.d.ts +6 -0
- package/docs/api/linkedIn.d.ts +6 -0
- package/docs/api/linkedInOutreach.d.ts +6 -0
- package/docs/api/lists.d.ts +22 -0
- package/docs/api/lists.md +24 -2
- package/docs/api/logs.d.ts +6 -0
- package/docs/api/mailboxes.d.ts +6 -0
- package/docs/api/marketingIntelligence.d.ts +40 -0
- package/docs/api/marketingIntelligence.md +20 -0
- package/docs/api/marketplace.d.ts +6 -0
- package/docs/api/mcp.d.ts +6 -0
- package/docs/api/me.d.ts +6 -0
- package/docs/api/meetings.d.ts +6 -0
- package/docs/api/newsletter.d.ts +6 -0
- package/docs/api/notes.d.ts +6 -0
- package/docs/api/notifications.d.ts +6 -0
- package/docs/api/objects.d.ts +6 -0
- package/docs/api/openSearch.d.ts +6 -0
- package/docs/api/ops.d.ts +6 -0
- package/docs/api/orgGovernance.d.ts +6 -0
- package/docs/api/orgVideos.d.ts +6 -0
- package/docs/api/organizationSettings.d.ts +6 -0
- package/docs/api/phoneNumbers.d.ts +6 -0
- package/docs/api/profile.d.ts +6 -0
- package/docs/api/programmaticPages.d.ts +6 -0
- package/docs/api/providerDomains.d.ts +6 -0
- package/docs/api/providerUsage.d.ts +6 -0
- package/docs/api/public.d.ts +6 -0
- package/docs/api/publicCopilot.d.ts +6 -0
- package/docs/api/publicSignals.d.ts +6 -0
- package/docs/api/publicVisitors.d.ts +6 -0
- package/docs/api/quotes.d.ts +6 -0
- package/docs/api/radarReports.d.ts +6 -0
- package/docs/api/recordRoles.d.ts +6 -0
- package/docs/api/repos.d.ts +6 -0
- package/docs/api/research.d.ts +6 -0
- package/docs/api/revenue.d.ts +6 -0
- package/docs/api/revenueAnalytics.d.ts +6 -0
- package/docs/api/revenueLifecycle.d.ts +11 -1
- package/docs/api/revenueLifecycle.md +11 -2
- package/docs/api/revenueRecords.d.ts +6 -0
- package/docs/api/roles.d.ts +49 -2
- package/docs/api/roles.md +65 -1
- package/docs/api/salesCoach.d.ts +6 -0
- package/docs/api/scans.d.ts +6 -0
- package/docs/api/scheduleBuy.d.ts +6 -0
- package/docs/api/scraping.d.ts +6 -0
- package/docs/api/search.d.ts +9 -1
- package/docs/api/search.md +3 -2
- package/docs/api/seo.d.ts +6 -0
- package/docs/api/sequenceLifecycle.d.ts +6 -0
- package/docs/api/sequences.d.ts +6 -0
- package/docs/api/settings.d.ts +6 -0
- package/docs/api/signals.d.ts +6 -0
- package/docs/api/signatures.d.ts +6 -0
- package/docs/api/snippet.d.ts +72 -2
- package/docs/api/snippet.md +73 -4
- package/docs/api/socialPublishing.d.ts +6 -0
- package/docs/api/studioDocuments.d.ts +6 -0
- package/docs/api/support.d.ts +6 -0
- package/docs/api/suppressions.d.ts +10 -0
- package/docs/api/suppressions.md +2 -0
- package/docs/api/surveys.d.ts +6 -0
- package/docs/api/tasks.d.ts +6 -0
- package/docs/api/teamMembers.d.ts +6 -0
- package/docs/api/teams.d.ts +6 -0
- package/docs/api/usage.d.ts +6 -0
- package/docs/api/visitors.d.ts +32 -0
- package/docs/api/visitors.md +12 -0
- package/docs/api/voice.d.ts +6 -0
- package/docs/api/webAnalytics.d.ts +288 -0
- package/docs/api/webAnalytics.md +144 -0
- package/docs/api/webChat.d.ts +6 -0
- package/docs/api/webhooks.d.ts +6 -0
- package/docs/api/websiteEditor.d.ts +6 -0
- package/docs/api/work.d.ts +6 -0
- package/docs/api/workbench.d.ts +6 -0
- package/docs/api/workflows.d.ts +6 -0
- package/docs/api/workflows.md +6 -0
- package/docs/sdk-clients.md +5 -5
- package/package.json +1 -1
package/docs/api/enrichment.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# `g8.api.enrichment`: Enrichment
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
115 operations (52 read, 21 write, 10 destructive, 32 billable).
|
|
6
6
|
|
|
7
7
|
3 of these also have a hand-written method (`g8.enrich`), 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
|
|
|
@@ -101,6 +101,7 @@ Exact TypeScript types for every operation on this page, and every schema they u
|
|
|
101
101
|
| [`lookupPerson`](#op-lookupperson) ★ | `POST /api/v1/enrichment/lookup/person` | billable | `enrichment:run` | Lookup Person |
|
|
102
102
|
| [`lookupPersonAlias`](#op-lookuppersonalias) | `POST /api/v1/enrichment/person` | billable | `enrichment:run` | Lookup Person (alias of /enrichment/lookup/person) |
|
|
103
103
|
| [`pauseEnrichmentJob`](#op-pauseenrichmentjob) | `POST /api/v1/enrichment/jobs/{job_id}/pause` | write | `enrichment:write` | Pause Enrichment Job |
|
|
104
|
+
| [`preflightEnrichment`](#op-preflightenrichment) | `POST /api/v1/enrichment/preflight` | read | `enrichment:read` | Preflight Enrichment |
|
|
104
105
|
| [`previewFindPeople`](#op-previewfindpeople) | `POST /api/v1/enrichment/find-people/{config_id}/preview` | billable | `enrichment:run` | Preview Find People |
|
|
105
106
|
| [`previewFormula`](#op-previewformula) | `POST /api/v1/enrichment/ai-formula/preview` | read | `enrichment:read` | Preview Formula |
|
|
106
107
|
| [`previewRecordSync`](#op-previewrecordsync) | `POST /api/v1/enrichment/record-sync/{entity_type}/preview` | read | `enrichment:read` | Preview Record Sync |
|
|
@@ -3255,6 +3256,80 @@ const result = await g8.api.enrichment.pauseEnrichmentJob({ path: { job_id: "id"
|
|
|
3255
3256
|
|
|
3256
3257
|
---
|
|
3257
3258
|
|
|
3259
|
+
<a id="op-preflightenrichment"></a>
|
|
3260
|
+
|
|
3261
|
+
### `g8.api.enrichment.preflightEnrichment(input)`
|
|
3262
|
+
|
|
3263
|
+
**Preflight Enrichment**
|
|
3264
|
+
|
|
3265
|
+
- HTTP: `POST /api/v1/enrichment/preflight`
|
|
3266
|
+
- operationId: `preflight_enrichment_enrichment_preflight_post` (also callable as `g8.api.call("preflight_enrichment_enrichment_preflight_post", input)`)
|
|
3267
|
+
- Tier: `read`: reads data; safe to call and to retry
|
|
3268
|
+
- API-key scope: `enrichment:read`
|
|
3269
|
+
|
|
3270
|
+
Check an enrichment request before running it. Free: nothing is written,
|
|
3271
|
+
queued or charged.
|
|
3272
|
+
|
|
3273
|
+
Errors for input a run could never use: an unknown `mode` (400
|
|
3274
|
+
`invalid_mode`), zero or negative contact IDs (400 `invalid_record_ids`), a
|
|
3275
|
+
list that is not in this organization (404 `list_not_found`), an unknown
|
|
3276
|
+
`target_field` (400 `unsupported_field`), an unknown provider (400
|
|
3277
|
+
`unsupported_provider` / `unsupported_provider_for_field`) and a missing AI
|
|
3278
|
+
config (404 `ai_config_not_found`).
|
|
3279
|
+
|
|
3280
|
+
Otherwise returns what the run would do: the unique contact IDs (repeats
|
|
3281
|
+
are counted once), contacts that are not on the list, the providers that
|
|
3282
|
+
would run, and plain warnings such as "Lusha is not connected: add your
|
|
3283
|
+
key" or "No providers chosen: using your saved pipeline".
|
|
3284
|
+
|
|
3285
|
+
**Input**
|
|
3286
|
+
|
|
3287
|
+
| Field | Type | Required | Description |
|
|
3288
|
+
|---|---|---|---|
|
|
3289
|
+
| `body` | `EnrichmentPreflightRequest` | yes | Request body; fields below. |
|
|
3290
|
+
|
|
3291
|
+
Body fields (`EnrichmentPreflightRequest`):
|
|
3292
|
+
|
|
3293
|
+
| Field | Type | Required | Description |
|
|
3294
|
+
|---|---|---|---|
|
|
3295
|
+
| `body.contact_ids` | `Array<integer>` | yes | Contact IDs to enrich (duplicates are counted once) |
|
|
3296
|
+
| `body.list_id` | `integer` | yes | List ID the contacts belong to |
|
|
3297
|
+
| `body.ai_group_id` | `string \| null` | no | group_id of a saved AI enrichment config (required for 'ai-research') |
|
|
3298
|
+
| `body.email_verification` | `boolean` | no | Add ZeroBounce email verification default `false` |
|
|
3299
|
+
| `body.mode` | `string` | no | 'auto' (AI when ai_group_id is set, else waterfall), 'waterfall' or 'ai-research' default `"auto"` |
|
|
3300
|
+
| `body.providers` | `Array<string> \| null` | no | Ordered provider names for a waterfall run. Omit to use the list's saved pipeline; an empty list also uses the saved pipeline (a warning says so). |
|
|
3301
|
+
| `body.target_field` | `string \| null` | no | Column to enrich: a canonical CONTACT_*/COMPANY_* column or a synonym like 'phone' or 'email' |
|
|
3302
|
+
|
|
3303
|
+
**Returns** `ApiResponse_EnrichmentPreflightResponse_`: the envelope `{ data: EnrichmentPreflightResponse, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
3304
|
+
|
|
3305
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
3306
|
+
|
|
3307
|
+
`EnrichmentPreflightResponse` fields:
|
|
3308
|
+
|
|
3309
|
+
| Field | Type | Required | Description |
|
|
3310
|
+
|---|---|---|---|
|
|
3311
|
+
| `contact_count` | `integer` | yes | Number of unique contacts (the count credits are estimated on) |
|
|
3312
|
+
| `contact_ids` | `Array<integer>` | yes | Contact IDs that will be enriched: duplicates removed, order kept |
|
|
3313
|
+
| `list_id` | `integer` | yes | |
|
|
3314
|
+
| `mode` | `string` | yes | Resolved mode: 'waterfall' or 'ai-research' |
|
|
3315
|
+
| `duplicates_removed` | `integer` | no | How many repeated contact IDs were dropped default `0` |
|
|
3316
|
+
| `list_name` | `string \| null` | no | |
|
|
3317
|
+
| `missing_credentials` | `Array<string>` | no | Providers whose step would be skipped because the org has no key for them |
|
|
3318
|
+
| `not_in_list` | `Array<integer>` | no | Contact IDs that are not on the list; the run skips them and does not charge for them |
|
|
3319
|
+
| `providers` | `Array<string>` | no | Providers that would run, in order (empty = the saved pipeline) |
|
|
3320
|
+
| `providers_detail` | `Array<ProviderStepDetail>` | no | |
|
|
3321
|
+
| `target_field` | `string \| null` | no | Canonical column for target_field, when given |
|
|
3322
|
+
| `uses_saved_pipeline` | `boolean` | no | True when the list's saved pipeline (or the graph8 default) would run default `false` |
|
|
3323
|
+
| `warnings` | `Array<string>` | no | Plain-language advisories for the user |
|
|
3324
|
+
|
|
3325
|
+
**Example**
|
|
3326
|
+
|
|
3327
|
+
```ts
|
|
3328
|
+
const result = await g8.api.enrichment.preflightEnrichment({ body: { contact_ids: [123], list_id: 123 } });
|
|
3329
|
+
```
|
|
3330
|
+
|
|
3331
|
+
---
|
|
3332
|
+
|
|
3258
3333
|
<a id="op-previewfindpeople"></a>
|
|
3259
3334
|
|
|
3260
3335
|
### `g8.api.enrichment.previewFindPeople(input)`
|
package/docs/api/events.d.ts
CHANGED
|
@@ -108,8 +108,14 @@ export interface PaginationMeta {
|
|
|
108
108
|
limit: number;
|
|
109
109
|
/** Opaque cursor for the next page; null when there are no more items. Pass it back as the `cursor` query param to fetch the following page without computing page numbers. */
|
|
110
110
|
next_cursor?: string | null;
|
|
111
|
+
/** Search endpoints only: plain-language notes about the result, e.g. that more records match than can be paged, or that a reversed `between` range was put in order. */
|
|
112
|
+
notes?: Array<string> | null;
|
|
111
113
|
/** Current page number (1-indexed) */
|
|
112
114
|
page: number;
|
|
113
115
|
/** Total number of items */
|
|
114
116
|
total: number;
|
|
117
|
+
/** Search endpoints only: how many records really match, when known. Can be larger than `total`, which is capped at the 10,000 results that can be paged. For company search this is a distinct-company estimate. Null when unknown; absent outside search. */
|
|
118
|
+
total_available?: number | null;
|
|
119
|
+
/** Search endpoints only: true when more records match than `total` shows (the result set is larger than the 10,000 results that can be paged). Absent outside search. */
|
|
120
|
+
total_is_lower_bound?: boolean | null;
|
|
115
121
|
}
|
package/docs/api/fields.d.ts
CHANGED
|
@@ -212,7 +212,7 @@ export interface ApiResponse_list_FieldResponse__ {
|
|
|
212
212
|
* level (a batch targets one entity and, when enrichment is used, one list).
|
|
213
213
|
*/
|
|
214
214
|
export interface BatchFieldItem {
|
|
215
|
-
/** Column data type
|
|
215
|
+
/** Column data type: 'text', 'int' (whole number), 'numeric' (decimal) or 'boolean' (yes/no). Unknown values 400. */
|
|
216
216
|
data_type?: string;
|
|
217
217
|
/** Optional per-column waterfall enrichment block (identical shape to POST /fields). When supplied, a companion enrichment_configs row is created for that column so it's immediately runnable. */
|
|
218
218
|
enrichment?: CreateFieldEnrichmentInput | null;
|
|
@@ -222,9 +222,13 @@ export interface BatchFieldItem {
|
|
|
222
222
|
|
|
223
223
|
/** Per-column outcome inside a batch response. */
|
|
224
224
|
export interface BatchFieldResult {
|
|
225
|
+
/** True when this column already existed (same name, same scope), so the existing column was returned instead of a new one. */
|
|
226
|
+
already_existed?: boolean;
|
|
225
227
|
enrichment?: CreateFieldEnrichmentResponse | null;
|
|
226
228
|
/** Set when the column was created but its companion enrichment config failed. */
|
|
227
229
|
error?: string | null;
|
|
230
|
+
/** When `already_existed` is true: the existing column's data type. */
|
|
231
|
+
existing_data_type?: string | null;
|
|
228
232
|
id?: number | null;
|
|
229
233
|
/** True when this column was created org-GLOBAL (no list_id was supplied) and will therefore appear on EVERY list in the org. Pass `list_id` to scope columns to one list. */
|
|
230
234
|
is_global?: boolean;
|
|
@@ -233,6 +237,8 @@ export interface BatchFieldResult {
|
|
|
233
237
|
name?: string | null;
|
|
234
238
|
ok?: boolean;
|
|
235
239
|
title: string;
|
|
240
|
+
/** Non-blocking notices for this column (e.g. same name exists org-wide). */
|
|
241
|
+
warnings?: Array<string>;
|
|
236
242
|
}
|
|
237
243
|
|
|
238
244
|
/**
|
|
@@ -279,7 +285,7 @@ export interface CreateFieldEnrichmentResponse {
|
|
|
279
285
|
|
|
280
286
|
/** Request body for creating a custom field (column). */
|
|
281
287
|
export interface CreateFieldRequest {
|
|
282
|
-
/** Column data type
|
|
288
|
+
/** Column data type: 'text', 'int' (whole number), 'numeric' (decimal) or 'boolean' (yes/no). Unknown values 400. If the name already exists with another type, the create is rejected with 409. */
|
|
283
289
|
data_type?: string;
|
|
284
290
|
/** Optional enrichment-pipeline block. When supplied, a companion `enrichment_configs` row is created in the same request so the new column is immediately runnable via /enrichment/waterfall/enrich. */
|
|
285
291
|
enrichment?: CreateFieldEnrichmentInput | null;
|
|
@@ -292,14 +298,20 @@ export interface CreateFieldRequest {
|
|
|
292
298
|
}
|
|
293
299
|
|
|
294
300
|
export interface CreateFieldResponse {
|
|
301
|
+
/** True when a column with this name already existed in this scope, so no new column was created and `id` is the existing column. A different `data_type` for an existing name is rejected with 409. */
|
|
302
|
+
already_existed?: boolean;
|
|
295
303
|
data_type: string;
|
|
296
304
|
/** Populated when the request included an `enrichment` block. Use `enrichment.column_id` for subsequent /enrichment/waterfall/enrich calls. */
|
|
297
305
|
enrichment?: CreateFieldEnrichmentResponse | null;
|
|
306
|
+
/** When `already_existed` is true: the existing column's data type. */
|
|
307
|
+
existing_data_type?: string | null;
|
|
298
308
|
id: number;
|
|
299
309
|
is_global: boolean;
|
|
300
310
|
list_id?: number | null;
|
|
301
311
|
name: string;
|
|
302
312
|
title: string;
|
|
313
|
+
/** Non-blocking notices, e.g. a column with the same name already exists org-wide, so the list now shows two columns with that name. */
|
|
314
|
+
warnings?: Array<string>;
|
|
303
315
|
}
|
|
304
316
|
|
|
305
317
|
/**
|
|
@@ -321,6 +333,9 @@ export interface CreateFieldsBatchResponse {
|
|
|
321
333
|
entity: string;
|
|
322
334
|
list_id?: number | null;
|
|
323
335
|
results: Array<BatchFieldResult>;
|
|
336
|
+
/** How many requested columns already existed and were returned as-is. */
|
|
337
|
+
total_already_existed?: number;
|
|
338
|
+
/** Columns returned by this call, INCLUDING ones that already existed (unchanged meaning). `total_already_existed` says how many of them were existing columns. */
|
|
324
339
|
total_created: number;
|
|
325
340
|
total_requested: number;
|
|
326
341
|
}
|
|
@@ -355,6 +370,8 @@ export interface FieldResponse {
|
|
|
355
370
|
data_type?: string;
|
|
356
371
|
id?: number | null;
|
|
357
372
|
is_global?: boolean;
|
|
373
|
+
/** Human-readable field name for display, e.g. 'First name' for CONTACT_FIRST_NAME. Custom columns use their title. Keep using `name` as the identifier. */
|
|
374
|
+
label?: string | null;
|
|
358
375
|
name?: string | null;
|
|
359
376
|
title: string;
|
|
360
377
|
}
|
|
@@ -370,11 +387,15 @@ export interface FieldValueItem {
|
|
|
370
387
|
/** Response body for reading a single custom column value from one row. */
|
|
371
388
|
export interface GetFieldValueResponse {
|
|
372
389
|
column_id: number;
|
|
390
|
+
/** The column's data type, the same value `GET /fields` reports in `data_type`: 'text', 'int', 'numeric' or 'boolean'. */
|
|
391
|
+
data_type?: string | null;
|
|
373
392
|
entity: string;
|
|
374
393
|
/** The underlying column slug (column_name_db). */
|
|
375
394
|
name: string;
|
|
376
395
|
record_id: number;
|
|
377
|
-
/** The stored value,
|
|
396
|
+
/** The stored value in its native JSON type: a number for 'int' and 'numeric' columns, true/false for 'boolean' columns, a string for text columns. Null when the column is unset for this row. */
|
|
397
|
+
typed_value?: boolean | number | string | null;
|
|
398
|
+
/** The stored value as text, or null if the column is unset for this row. Number and yes/no columns are returned in text form ('42', '12.5', 'true'/'false'); read `typed_value` for the native JSON value. */
|
|
378
399
|
value?: string | null;
|
|
379
400
|
}
|
|
380
401
|
|
|
@@ -385,10 +406,16 @@ export interface PaginationMeta {
|
|
|
385
406
|
limit: number;
|
|
386
407
|
/** Opaque cursor for the next page; null when there are no more items. Pass it back as the `cursor` query param to fetch the following page without computing page numbers. */
|
|
387
408
|
next_cursor?: string | null;
|
|
409
|
+
/** Search endpoints only: plain-language notes about the result, e.g. that more records match than can be paged, or that a reversed `between` range was put in order. */
|
|
410
|
+
notes?: Array<string> | null;
|
|
388
411
|
/** Current page number (1-indexed) */
|
|
389
412
|
page: number;
|
|
390
413
|
/** Total number of items */
|
|
391
414
|
total: number;
|
|
415
|
+
/** Search endpoints only: how many records really match, when known. Can be larger than `total`, which is capped at the 10,000 results that can be paged. For company search this is a distinct-company estimate. Null when unknown; absent outside search. */
|
|
416
|
+
total_available?: number | null;
|
|
417
|
+
/** Search endpoints only: true when more records match than `total` shows (the result set is larger than the 10,000 results that can be paged). Absent outside search. */
|
|
418
|
+
total_is_lower_bound?: boolean | null;
|
|
392
419
|
}
|
|
393
420
|
|
|
394
421
|
/** One row (contact or company) plus the columns to set on it. */
|
package/docs/api/fields.md
CHANGED
|
@@ -66,7 +66,7 @@ Body fields (`CreateFieldRequest`):
|
|
|
66
66
|
| Field | Type | Required | Description |
|
|
67
67
|
|---|---|---|---|
|
|
68
68
|
| `body.title` | `string` | yes | Column title, e.g. 'Job Level' |
|
|
69
|
-
| `body.data_type` | `string` | no | Column data type
|
|
69
|
+
| `body.data_type` | `string` | no | Column data type: 'text', 'int' (whole number), 'numeric' (decimal) or 'boolean' (yes/no). Unknown values 400. If the name already exists with another type, the create is rejected with 409. default `"text"` |
|
|
70
70
|
| `body.enrichment` | `CreateFieldEnrichmentInput \| null` | no | Optional enrichment-pipeline block. When supplied, a companion `enrichment_configs` row is created in the same request so the new column is immediately runnable via /enrichment/waterfall/enrich. |
|
|
71
71
|
| `body.entity` | `string` | no | Target entity: 'contacts' or 'companies' default `"contacts"` |
|
|
72
72
|
| `body.list_id` | `integer \| null` | no | If set, field is list-specific; otherwise global across the org |
|
|
@@ -84,8 +84,11 @@ Other envelope fields: `pagination` (PaginationMeta).
|
|
|
84
84
|
| `is_global` | `boolean` | yes | |
|
|
85
85
|
| `name` | `string` | yes | |
|
|
86
86
|
| `title` | `string` | yes | |
|
|
87
|
+
| `already_existed` | `boolean` | no | True when a column with this name already existed in this scope, so no new column was created and `id` is the existing column. A different `data_type` for an existing name is rejected with 409. default `false` |
|
|
87
88
|
| `enrichment` | `CreateFieldEnrichmentResponse \| null` | no | Populated when the request included an `enrichment` block. Use `enrichment.column_id` for subsequent /enrichment/waterfall/enrich calls. |
|
|
89
|
+
| `existing_data_type` | `string \| null` | no | When `already_existed` is true: the existing column's data type. |
|
|
88
90
|
| `list_id` | `integer \| null` | no | |
|
|
91
|
+
| `warnings` | `Array<string>` | no | Non-blocking notices, e.g. a column with the same name already exists org-wide, so the list now shows two columns with that name. |
|
|
89
92
|
|
|
90
93
|
**Example**
|
|
91
94
|
|
|
@@ -146,9 +149,10 @@ Other envelope fields: `pagination` (PaginationMeta).
|
|
|
146
149
|
|---|---|---|---|
|
|
147
150
|
| `entity` | `string` | yes | |
|
|
148
151
|
| `results` | `Array<BatchFieldResult>` | yes | |
|
|
149
|
-
| `total_created` | `integer` | yes |
|
|
152
|
+
| `total_created` | `integer` | yes | Columns returned by this call, INCLUDING ones that already existed (unchanged meaning). `total_already_existed` says how many of them were existing columns. |
|
|
150
153
|
| `total_requested` | `integer` | yes | |
|
|
151
154
|
| `list_id` | `integer \| null` | no | |
|
|
155
|
+
| `total_already_existed` | `integer` | no | How many requested columns already existed and were returned as-is. default `0` |
|
|
152
156
|
|
|
153
157
|
**Example**
|
|
154
158
|
|
|
@@ -251,7 +255,9 @@ Other envelope fields: `pagination` (PaginationMeta).
|
|
|
251
255
|
| `entity` | `string` | yes | |
|
|
252
256
|
| `name` | `string` | yes | The underlying column slug (column_name_db). |
|
|
253
257
|
| `record_id` | `integer` | yes | |
|
|
254
|
-
| `
|
|
258
|
+
| `data_type` | `string \| null` | no | The column's data type, the same value `GET /fields` reports in `data_type`: 'text', 'int', 'numeric' or 'boolean'. |
|
|
259
|
+
| `typed_value` | `boolean \| integer \| number \| string \| null \| null` | no | The stored value in its native JSON type: a number for 'int' and 'numeric' columns, true/false for 'boolean' columns, a string for text columns. Null when the column is unset for this row. |
|
|
260
|
+
| `value` | `string \| null` | no | The stored value as text, or null if the column is unset for this row. Number and yes/no columns are returned in text form ('42', '12.5', 'true'/'false'); read `typed_value` for the native JSON value. |
|
|
255
261
|
|
|
256
262
|
**Example**
|
|
257
263
|
|
|
@@ -293,6 +299,7 @@ Other envelope fields: `pagination` (PaginationMeta).
|
|
|
293
299
|
| `data_type` | `string` | no | default `"text"` |
|
|
294
300
|
| `id` | `integer \| null` | no | |
|
|
295
301
|
| `is_global` | `boolean` | no | default `true` |
|
|
302
|
+
| `label` | `string \| null` | no | Human-readable field name for display, e.g. 'First name' for CONTACT_FIRST_NAME. Custom columns use their title. Keep using `name` as the identifier. |
|
|
296
303
|
| `name` | `string \| null` | no | |
|
|
297
304
|
|
|
298
305
|
**Example**
|
|
@@ -335,6 +342,7 @@ Other envelope fields: `pagination` (PaginationMeta).
|
|
|
335
342
|
| `data_type` | `string` | no | default `"text"` |
|
|
336
343
|
| `id` | `integer \| null` | no | |
|
|
337
344
|
| `is_global` | `boolean` | no | default `true` |
|
|
345
|
+
| `label` | `string \| null` | no | Human-readable field name for display, e.g. 'First name' for CONTACT_FIRST_NAME. Custom columns use their title. Keep using `name` as the identifier. |
|
|
338
346
|
| `name` | `string \| null` | no | |
|
|
339
347
|
|
|
340
348
|
**Example**
|
|
@@ -489,7 +497,7 @@ One column in a batch-create request. `title`, `data_type` and the optional `enr
|
|
|
489
497
|
| Field | Type | Required | Description |
|
|
490
498
|
|---|---|---|---|
|
|
491
499
|
| `title` | `string` | yes | Column title, e.g. 'Job Level' |
|
|
492
|
-
| `data_type` | `string` | no | Column data type
|
|
500
|
+
| `data_type` | `string` | no | Column data type: 'text', 'int' (whole number), 'numeric' (decimal) or 'boolean' (yes/no). Unknown values 400. default `"text"` |
|
|
493
501
|
| `enrichment` | `CreateFieldEnrichmentInput \| null` | no | Optional per-column waterfall enrichment block (identical shape to POST /fields). When supplied, a companion enrichment_configs row is created for that column so it's immediately runnable. |
|
|
494
502
|
|
|
495
503
|
<a id="type-batchfieldresult"></a>
|
|
@@ -501,13 +509,16 @@ Per-column outcome inside a batch response.
|
|
|
501
509
|
| Field | Type | Required | Description |
|
|
502
510
|
|---|---|---|---|
|
|
503
511
|
| `title` | `string` | yes | |
|
|
512
|
+
| `already_existed` | `boolean` | no | True when this column already existed (same name, same scope), so the existing column was returned instead of a new one. default `false` |
|
|
504
513
|
| `enrichment` | `CreateFieldEnrichmentResponse \| null` | no | |
|
|
505
514
|
| `error` | `string \| null` | no | Set when the column was created but its companion enrichment config failed. |
|
|
515
|
+
| `existing_data_type` | `string \| null` | no | When `already_existed` is true: the existing column's data type. |
|
|
506
516
|
| `id` | `integer \| null` | no | |
|
|
507
517
|
| `is_global` | `boolean` | no | True when this column was created org-GLOBAL (no list_id was supplied) and will therefore appear on EVERY list in the org. Pass `list_id` to scope columns to one list. default `false` |
|
|
508
518
|
| `list_id` | `integer \| null` | no | The list this column is scoped to, or null when it is org-global. |
|
|
509
519
|
| `name` | `string \| null` | no | |
|
|
510
520
|
| `ok` | `boolean` | no | default `true` |
|
|
521
|
+
| `warnings` | `Array<string>` | no | Non-blocking notices for this column (e.g. same name exists org-wide). |
|
|
511
522
|
|
|
512
523
|
<a id="type-createfieldenrichmentinput"></a>
|
|
513
524
|
|
package/docs/api/forms.d.ts
CHANGED
|
@@ -1005,8 +1005,14 @@ export interface PaginationMeta {
|
|
|
1005
1005
|
limit: number;
|
|
1006
1006
|
/** Opaque cursor for the next page; null when there are no more items. Pass it back as the `cursor` query param to fetch the following page without computing page numbers. */
|
|
1007
1007
|
next_cursor?: string | null;
|
|
1008
|
+
/** Search endpoints only: plain-language notes about the result, e.g. that more records match than can be paged, or that a reversed `between` range was put in order. */
|
|
1009
|
+
notes?: Array<string> | null;
|
|
1008
1010
|
/** Current page number (1-indexed) */
|
|
1009
1011
|
page: number;
|
|
1010
1012
|
/** Total number of items */
|
|
1011
1013
|
total: number;
|
|
1014
|
+
/** Search endpoints only: how many records really match, when known. Can be larger than `total`, which is capped at the 10,000 results that can be paged. For company search this is a distinct-company estimate. Null when unknown; absent outside search. */
|
|
1015
|
+
total_available?: number | null;
|
|
1016
|
+
/** Search endpoints only: true when more records match than `total` shows (the result set is larger than the 10,000 results that can be paged). Absent outside search. */
|
|
1017
|
+
total_is_lower_bound?: boolean | null;
|
|
1012
1018
|
}
|
|
@@ -585,10 +585,16 @@ export interface PaginationMeta {
|
|
|
585
585
|
limit: number;
|
|
586
586
|
/** Opaque cursor for the next page; null when there are no more items. Pass it back as the `cursor` query param to fetch the following page without computing page numbers. */
|
|
587
587
|
next_cursor?: string | null;
|
|
588
|
+
/** Search endpoints only: plain-language notes about the result, e.g. that more records match than can be paged, or that a reversed `between` range was put in order. */
|
|
589
|
+
notes?: Array<string> | null;
|
|
588
590
|
/** Current page number (1-indexed) */
|
|
589
591
|
page: number;
|
|
590
592
|
/** Total number of items */
|
|
591
593
|
total: number;
|
|
594
|
+
/** Search endpoints only: how many records really match, when known. Can be larger than `total`, which is capped at the 10,000 results that can be paged. For company search this is a distinct-company estimate. Null when unknown; absent outside search. */
|
|
595
|
+
total_available?: number | null;
|
|
596
|
+
/** Search endpoints only: true when more records match than `total` shows (the result set is larger than the 10,000 results that can be paged). Absent outside search. */
|
|
597
|
+
total_is_lower_bound?: boolean | null;
|
|
592
598
|
}
|
|
593
599
|
|
|
594
600
|
export interface SequenceStepRef {
|
package/docs/api/gtmContext.d.ts
CHANGED
|
@@ -1040,10 +1040,16 @@ export interface PaginationMeta {
|
|
|
1040
1040
|
limit: number;
|
|
1041
1041
|
/** Opaque cursor for the next page; null when there are no more items. Pass it back as the `cursor` query param to fetch the following page without computing page numbers. */
|
|
1042
1042
|
next_cursor?: string | null;
|
|
1043
|
+
/** Search endpoints only: plain-language notes about the result, e.g. that more records match than can be paged, or that a reversed `between` range was put in order. */
|
|
1044
|
+
notes?: Array<string> | null;
|
|
1043
1045
|
/** Current page number (1-indexed) */
|
|
1044
1046
|
page: number;
|
|
1045
1047
|
/** Total number of items */
|
|
1046
1048
|
total: number;
|
|
1049
|
+
/** Search endpoints only: how many records really match, when known. Can be larger than `total`, which is capped at the 10,000 results that can be paged. For company search this is a distinct-company estimate. Null when unknown; absent outside search. */
|
|
1050
|
+
total_available?: number | null;
|
|
1051
|
+
/** Search endpoints only: true when more records match than `total` shows (the result set is larger than the 10,000 results that can be paged). Absent outside search. */
|
|
1052
|
+
total_is_lower_bound?: boolean | null;
|
|
1047
1053
|
}
|
|
1048
1054
|
|
|
1049
1055
|
/** Mirrors `company_profile.SaveProfileRequest`. */
|
|
@@ -53,8 +53,14 @@ export interface PaginationMeta {
|
|
|
53
53
|
limit: number;
|
|
54
54
|
/** Opaque cursor for the next page; null when there are no more items. Pass it back as the `cursor` query param to fetch the following page without computing page numbers. */
|
|
55
55
|
next_cursor?: string | null;
|
|
56
|
+
/** Search endpoints only: plain-language notes about the result, e.g. that more records match than can be paged, or that a reversed `between` range was put in order. */
|
|
57
|
+
notes?: Array<string> | null;
|
|
56
58
|
/** Current page number (1-indexed) */
|
|
57
59
|
page: number;
|
|
58
60
|
/** Total number of items */
|
|
59
61
|
total: number;
|
|
62
|
+
/** Search endpoints only: how many records really match, when known. Can be larger than `total`, which is capped at the 10,000 results that can be paged. For company search this is a distinct-company estimate. Null when unknown; absent outside search. */
|
|
63
|
+
total_available?: number | null;
|
|
64
|
+
/** Search endpoints only: true when more records match than `total` shows (the result set is larger than the 10,000 results that can be paged). Absent outside search. */
|
|
65
|
+
total_is_lower_bound?: boolean | null;
|
|
60
66
|
}
|
|
@@ -69,8 +69,14 @@ export interface PaginationMeta {
|
|
|
69
69
|
limit: number;
|
|
70
70
|
/** Opaque cursor for the next page; null when there are no more items. Pass it back as the `cursor` query param to fetch the following page without computing page numbers. */
|
|
71
71
|
next_cursor?: string | null;
|
|
72
|
+
/** Search endpoints only: plain-language notes about the result, e.g. that more records match than can be paged, or that a reversed `between` range was put in order. */
|
|
73
|
+
notes?: Array<string> | null;
|
|
72
74
|
/** Current page number (1-indexed) */
|
|
73
75
|
page: number;
|
|
74
76
|
/** Total number of items */
|
|
75
77
|
total: number;
|
|
78
|
+
/** Search endpoints only: how many records really match, when known. Can be larger than `total`, which is capped at the 10,000 results that can be paged. For company search this is a distinct-company estimate. Null when unknown; absent outside search. */
|
|
79
|
+
total_available?: number | null;
|
|
80
|
+
/** Search endpoints only: true when more records match than `total` shows (the result set is larger than the 10,000 results that can be paged). Absent outside search. */
|
|
81
|
+
total_is_lower_bound?: boolean | null;
|
|
76
82
|
}
|
package/docs/api/gtmLibrary.d.ts
CHANGED
|
@@ -415,10 +415,16 @@ export interface PaginationMeta {
|
|
|
415
415
|
limit: number;
|
|
416
416
|
/** Opaque cursor for the next page; null when there are no more items. Pass it back as the `cursor` query param to fetch the following page without computing page numbers. */
|
|
417
417
|
next_cursor?: string | null;
|
|
418
|
+
/** Search endpoints only: plain-language notes about the result, e.g. that more records match than can be paged, or that a reversed `between` range was put in order. */
|
|
419
|
+
notes?: Array<string> | null;
|
|
418
420
|
/** Current page number (1-indexed) */
|
|
419
421
|
page: number;
|
|
420
422
|
/** Total number of items */
|
|
421
423
|
total: number;
|
|
424
|
+
/** Search endpoints only: how many records really match, when known. Can be larger than `total`, which is capped at the 10,000 results that can be paged. For company search this is a distinct-company estimate. Null when unknown; absent outside search. */
|
|
425
|
+
total_available?: number | null;
|
|
426
|
+
/** Search endpoints only: true when more records match than `total` shows (the result set is larger than the 10,000 results that can be paged). Absent outside search. */
|
|
427
|
+
total_is_lower_bound?: boolean | null;
|
|
422
428
|
}
|
|
423
429
|
|
|
424
430
|
export interface PersonaFillFromDocRequest {
|
|
@@ -317,10 +317,16 @@ export interface PaginationMeta {
|
|
|
317
317
|
limit: number;
|
|
318
318
|
/** Opaque cursor for the next page; null when there are no more items. Pass it back as the `cursor` query param to fetch the following page without computing page numbers. */
|
|
319
319
|
next_cursor?: string | null;
|
|
320
|
+
/** Search endpoints only: plain-language notes about the result, e.g. that more records match than can be paged, or that a reversed `between` range was put in order. */
|
|
321
|
+
notes?: Array<string> | null;
|
|
320
322
|
/** Current page number (1-indexed) */
|
|
321
323
|
page: number;
|
|
322
324
|
/** Total number of items */
|
|
323
325
|
total: number;
|
|
326
|
+
/** Search endpoints only: how many records really match, when known. Can be larger than `total`, which is capped at the 10,000 results that can be paged. For company search this is a distinct-company estimate. Null when unknown; absent outside search. */
|
|
327
|
+
total_available?: number | null;
|
|
328
|
+
/** Search endpoints only: true when more records match than `total` shows (the result set is larger than the 10,000 results that can be paged). Absent outside search. */
|
|
329
|
+
total_is_lower_bound?: boolean | null;
|
|
324
330
|
}
|
|
325
331
|
|
|
326
332
|
/**
|
package/docs/api/imports.d.ts
CHANGED
|
@@ -150,8 +150,14 @@ export interface PaginationMeta {
|
|
|
150
150
|
limit: number;
|
|
151
151
|
/** Opaque cursor for the next page; null when there are no more items. Pass it back as the `cursor` query param to fetch the following page without computing page numbers. */
|
|
152
152
|
next_cursor?: string | null;
|
|
153
|
+
/** Search endpoints only: plain-language notes about the result, e.g. that more records match than can be paged, or that a reversed `between` range was put in order. */
|
|
154
|
+
notes?: Array<string> | null;
|
|
153
155
|
/** Current page number (1-indexed) */
|
|
154
156
|
page: number;
|
|
155
157
|
/** Total number of items */
|
|
156
158
|
total: number;
|
|
159
|
+
/** Search endpoints only: how many records really match, when known. Can be larger than `total`, which is capped at the 10,000 results that can be paged. For company search this is a distinct-company estimate. Null when unknown; absent outside search. */
|
|
160
|
+
total_available?: number | null;
|
|
161
|
+
/** Search endpoints only: true when more records match than `total` shows (the result set is larger than the 10,000 results that can be paged). Absent outside search. */
|
|
162
|
+
total_is_lower_bound?: boolean | null;
|
|
157
163
|
}
|
package/docs/api/inbox.d.ts
CHANGED
|
@@ -633,10 +633,16 @@ export interface PaginationMeta {
|
|
|
633
633
|
limit: number;
|
|
634
634
|
/** Opaque cursor for the next page; null when there are no more items. Pass it back as the `cursor` query param to fetch the following page without computing page numbers. */
|
|
635
635
|
next_cursor?: string | null;
|
|
636
|
+
/** Search endpoints only: plain-language notes about the result, e.g. that more records match than can be paged, or that a reversed `between` range was put in order. */
|
|
637
|
+
notes?: Array<string> | null;
|
|
636
638
|
/** Current page number (1-indexed) */
|
|
637
639
|
page: number;
|
|
638
640
|
/** Total number of items */
|
|
639
641
|
total: number;
|
|
642
|
+
/** Search endpoints only: how many records really match, when known. Can be larger than `total`, which is capped at the 10,000 results that can be paged. For company search this is a distinct-company estimate. Null when unknown; absent outside search. */
|
|
643
|
+
total_available?: number | null;
|
|
644
|
+
/** Search endpoints only: true when more records match than `total` shows (the result set is larger than the 10,000 results that can be paged). Absent outside search. */
|
|
645
|
+
total_is_lower_bound?: boolean | null;
|
|
640
646
|
}
|
|
641
647
|
|
|
642
648
|
/** A named queue + filter combination. */
|
package/docs/api/install.d.ts
CHANGED
|
@@ -106,6 +106,12 @@ export interface InstallOperations {
|
|
|
106
106
|
/** Repository ID */
|
|
107
107
|
repo_id: string;
|
|
108
108
|
};
|
|
109
|
+
query?: {
|
|
110
|
+
/** Page number (1-indexed). Omit page and limit to get every stream. */
|
|
111
|
+
page?: number | null;
|
|
112
|
+
/** Streams per page (max 200). Omit page and limit to get every stream. */
|
|
113
|
+
limit?: number | null;
|
|
114
|
+
};
|
|
109
115
|
headers?: {
|
|
110
116
|
"X-Target-Org-Id"?: string | null;
|
|
111
117
|
};
|
|
@@ -165,10 +171,16 @@ export interface PaginationMeta {
|
|
|
165
171
|
limit: number;
|
|
166
172
|
/** Opaque cursor for the next page; null when there are no more items. Pass it back as the `cursor` query param to fetch the following page without computing page numbers. */
|
|
167
173
|
next_cursor?: string | null;
|
|
174
|
+
/** Search endpoints only: plain-language notes about the result, e.g. that more records match than can be paged, or that a reversed `between` range was put in order. */
|
|
175
|
+
notes?: Array<string> | null;
|
|
168
176
|
/** Current page number (1-indexed) */
|
|
169
177
|
page: number;
|
|
170
178
|
/** Total number of items */
|
|
171
179
|
total: number;
|
|
180
|
+
/** Search endpoints only: how many records really match, when known. Can be larger than `total`, which is capped at the 10,000 results that can be paged. For company search this is a distinct-company estimate. Null when unknown; absent outside search. */
|
|
181
|
+
total_available?: number | null;
|
|
182
|
+
/** Search endpoints only: true when more records match than `total` shows (the result set is larger than the 10,000 results that can be paged). Absent outside search. */
|
|
183
|
+
total_is_lower_bound?: boolean | null;
|
|
172
184
|
}
|
|
173
185
|
|
|
174
186
|
export interface PatchResponse {
|
|
@@ -190,6 +202,10 @@ export interface PatchSetResponse {
|
|
|
190
202
|
}
|
|
191
203
|
|
|
192
204
|
export interface SnippetResponse {
|
|
205
|
+
/** True when the organization has several streams and none could be identified as its main website. The write key is the first stream's (unchanged legacy default); pick the right one from available_streams and call again with stream_id. */
|
|
206
|
+
action_required?: boolean;
|
|
207
|
+
/** The organization's streams to choose from. Filled only when action_required is true. */
|
|
208
|
+
available_streams?: Array<StreamInfoResponse>;
|
|
193
209
|
/** Full configuration object for gtm/config.json */
|
|
194
210
|
config?: Record<string, unknown>;
|
|
195
211
|
domains?: Array<string>;
|
|
@@ -197,17 +213,33 @@ export interface SnippetResponse {
|
|
|
197
213
|
react_snippet: string;
|
|
198
214
|
/** Vanilla JS script tag for non-React apps */
|
|
199
215
|
script_tag: string;
|
|
216
|
+
/** ID of the tracking stream the write key belongs to, when known. */
|
|
217
|
+
stream_id?: string | null;
|
|
218
|
+
/** User-friendly name of that stream, when known. */
|
|
219
|
+
stream_name?: string | null;
|
|
220
|
+
/** How the stream was chosen: 'explicit' (stream_id given), 'repo_write_key' (the repository's stored key), 'only_stream', 'domain_match' (matches the organization's website), or 'first_stream_fallback' (ambiguous; see action_required). */
|
|
221
|
+
stream_selection?: string | null;
|
|
200
222
|
tracking_host?: string;
|
|
223
|
+
/** Human-readable explanation when action_required is true, or a stream setup advisory. */
|
|
224
|
+
warning?: string | null;
|
|
201
225
|
write_key: string;
|
|
202
226
|
}
|
|
203
227
|
|
|
204
228
|
export interface StreamInfoResponse {
|
|
205
229
|
/** Domains associated with this stream */
|
|
206
230
|
domains?: Array<string>;
|
|
231
|
+
/** Whether the stream lists allowed domains. False means its public write key is accepted from any website (see warning). */
|
|
232
|
+
domains_restricted?: boolean;
|
|
207
233
|
/** Stream ID used to select this stream */
|
|
208
234
|
id: string;
|
|
235
|
+
/** True for the stream GET /snippet uses when no stream_id is given: the only stream, or the one whose domain matches the organization's website. False on every stream when that choice is ambiguous; pass stream_id explicitly then. */
|
|
236
|
+
is_default?: boolean;
|
|
209
237
|
/** User-friendly stream name (e.g. 'graph8.com', 'heyreach-graph8') */
|
|
210
238
|
name: string;
|
|
239
|
+
/** Connected repository whose stored write key belongs to this stream. Null when no connected repository uses it: streams are organization-level, not owned by a repo. */
|
|
240
|
+
repo_id?: string | null;
|
|
241
|
+
/** Read-only advisory about this stream's setup, e.g. no allowed domains. Nothing is enforced. */
|
|
242
|
+
warning?: string | null;
|
|
211
243
|
/** Public write key for this stream */
|
|
212
244
|
write_key?: string | null;
|
|
213
245
|
}
|
package/docs/api/install.md
CHANGED
|
@@ -201,9 +201,15 @@ Other envelope fields: `pagination` (PaginationMeta).
|
|
|
201
201
|
| `react_snippet` | `string` | yes | Ready-to-use React component import for @graph8/nextjs |
|
|
202
202
|
| `script_tag` | `string` | yes | Vanilla JS script tag for non-React apps |
|
|
203
203
|
| `write_key` | `string` | yes | |
|
|
204
|
+
| `action_required` | `boolean` | no | True when the organization has several streams and none could be identified as its main website. The write key is the first stream's (unchanged legacy default); pick the right one from available_streams and call again with stream_id. default `false` |
|
|
205
|
+
| `available_streams` | `Array<StreamInfoResponse>` | no | The organization's streams to choose from. Filled only when action_required is true. |
|
|
204
206
|
| `config` | `Record<string, unknown>` | no | Full configuration object for gtm/config.json |
|
|
205
207
|
| `domains` | `Array<string>` | no | |
|
|
208
|
+
| `stream_id` | `string \| null` | no | ID of the tracking stream the write key belongs to, when known. |
|
|
209
|
+
| `stream_name` | `string \| null` | no | User-friendly name of that stream, when known. |
|
|
210
|
+
| `stream_selection` | `string \| null` | no | How the stream was chosen: 'explicit' (stream_id given), 'repo_write_key' (the repository's stored key), 'only_stream', 'domain_match' (matches the organization's website), or 'first_stream_fallback' (ambiguous; see action_required). |
|
|
206
211
|
| `tracking_host` | `string` | no | default `"https://t.graph8.com"` |
|
|
212
|
+
| `warning` | `string \| null` | no | Human-readable explanation when action_required is true, or a stream setup advisory. |
|
|
207
213
|
|
|
208
214
|
**Example**
|
|
209
215
|
|
|
@@ -230,11 +236,19 @@ Returns each stream's ID, user-friendly name (domain or label),
|
|
|
230
236
|
associated domains, and write key. The caller should select one
|
|
231
237
|
and pass its `id` to the snippet endpoint.
|
|
232
238
|
|
|
239
|
+
Streams belong to the organization, not to the repository: every stream
|
|
240
|
+
of the org is listed, and `repo_id` on each one names the connected
|
|
241
|
+
repository already using it (null when none does). The repository must
|
|
242
|
+
exist in the caller's organization (404 otherwise). The org-level
|
|
243
|
+
equivalent that needs no repository is `GET /streams`.
|
|
244
|
+
|
|
233
245
|
**Input**
|
|
234
246
|
|
|
235
247
|
| Field | Type | Required | Description |
|
|
236
248
|
|---|---|---|---|
|
|
237
249
|
| `path.repo_id` | `string` | yes | Repository ID |
|
|
250
|
+
| `query.page` | `integer \| null` | no | Page number (1-indexed). Omit page and limit to get every stream. |
|
|
251
|
+
| `query.limit` | `integer \| null` | no | Streams per page (max 200). Omit page and limit to get every stream. |
|
|
238
252
|
|
|
239
253
|
**Returns** `ApiResponse_list_StreamInfoResponse__`: the envelope `{ data: Array<StreamInfoResponse>, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
240
254
|
|
|
@@ -247,6 +261,10 @@ Other envelope fields: `pagination` (PaginationMeta).
|
|
|
247
261
|
| `id` | `string` | yes | Stream ID used to select this stream |
|
|
248
262
|
| `name` | `string` | yes | User-friendly stream name (e.g. 'graph8.com', 'heyreach-graph8') |
|
|
249
263
|
| `domains` | `Array<string>` | no | Domains associated with this stream |
|
|
264
|
+
| `domains_restricted` | `boolean` | no | Whether the stream lists allowed domains. False means its public write key is accepted from any website (see warning). default `false` |
|
|
265
|
+
| `is_default` | `boolean` | no | True for the stream GET /snippet uses when no stream_id is given: the only stream, or the one whose domain matches the organization's website. False on every stream when that choice is ambiguous; pass stream_id explicitly then. default `false` |
|
|
266
|
+
| `repo_id` | `string \| null` | no | Connected repository whose stored write key belongs to this stream. Null when no connected repository uses it: streams are organization-level, not owned by a repo. |
|
|
267
|
+
| `warning` | `string \| null` | no | Read-only advisory about this stream's setup, e.g. no allowed domains. Nothing is enforced. |
|
|
250
268
|
| `write_key` | `string \| null` | no | Public write key for this stream |
|
|
251
269
|
|
|
252
270
|
**Example**
|
|
@@ -124,8 +124,14 @@ export interface PaginationMeta {
|
|
|
124
124
|
limit: number;
|
|
125
125
|
/** Opaque cursor for the next page; null when there are no more items. Pass it back as the `cursor` query param to fetch the following page without computing page numbers. */
|
|
126
126
|
next_cursor?: string | null;
|
|
127
|
+
/** Search endpoints only: plain-language notes about the result, e.g. that more records match than can be paged, or that a reversed `between` range was put in order. */
|
|
128
|
+
notes?: Array<string> | null;
|
|
127
129
|
/** Current page number (1-indexed) */
|
|
128
130
|
page: number;
|
|
129
131
|
/** Total number of items */
|
|
130
132
|
total: number;
|
|
133
|
+
/** Search endpoints only: how many records really match, when known. Can be larger than `total`, which is capped at the 10,000 results that can be paged. For company search this is a distinct-company estimate. Null when unknown; absent outside search. */
|
|
134
|
+
total_available?: number | null;
|
|
135
|
+
/** Search endpoints only: true when more records match than `total` shows (the result set is larger than the 10,000 results that can be paged). Absent outside search. */
|
|
136
|
+
total_is_lower_bound?: boolean | null;
|
|
131
137
|
}
|
|
@@ -135,8 +135,14 @@ export interface PaginationMeta {
|
|
|
135
135
|
limit: number;
|
|
136
136
|
/** Opaque cursor for the next page; null when there are no more items. Pass it back as the `cursor` query param to fetch the following page without computing page numbers. */
|
|
137
137
|
next_cursor?: string | null;
|
|
138
|
+
/** Search endpoints only: plain-language notes about the result, e.g. that more records match than can be paged, or that a reversed `between` range was put in order. */
|
|
139
|
+
notes?: Array<string> | null;
|
|
138
140
|
/** Current page number (1-indexed) */
|
|
139
141
|
page: number;
|
|
140
142
|
/** Total number of items */
|
|
141
143
|
total: number;
|
|
144
|
+
/** Search endpoints only: how many records really match, when known. Can be larger than `total`, which is capped at the 10,000 results that can be paged. For company search this is a distinct-company estimate. Null when unknown; absent outside search. */
|
|
145
|
+
total_available?: number | null;
|
|
146
|
+
/** Search endpoints only: true when more records match than `total` shows (the result set is larger than the 10,000 results that can be paged). Absent outside search. */
|
|
147
|
+
total_is_lower_bound?: boolean | null;
|
|
142
148
|
}
|