@graph8/sdk 0.293.0 → 0.294.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -34,7 +34,7 @@ export interface SearchResults {
34
34
  export declare const createEnrichClient: (apiKey: string, apiUrl?: string) => {
35
35
  /**
36
36
  * Look up a person by email, LinkedIn, or name + company. Costs 2 credits per
37
- * lookup, charged even when no match is found (`found: false`).
37
+ * lookup, charged only when a match is found (`found: false` costs nothing).
38
38
  */
39
39
  person(params: {
40
40
  email?: string;
@@ -45,7 +45,7 @@ export declare const createEnrichClient: (apiKey: string, apiUrl?: string) => {
45
45
  }): Promise<PersonEnrichment>;
46
46
  /**
47
47
  * Look up a company by domain or name. Costs 2 credits per lookup, charged
48
- * even when no match is found (`found: false`).
48
+ * only when a match is found (`found: false` costs nothing).
49
49
  */
50
50
  company(params: {
51
51
  domain?: string;
@@ -128,9 +128,7 @@ export declare const useG8: () => {
128
128
  company_domain?: string;
129
129
  }): Promise<import("./enrich").PersonEnrichment>;
130
130
  company(params: {
131
- domain
132
- /** Progressive form helpers (read lazily, so useG8() never throws on its own) */
133
- ? /** Progressive form helpers (read lazily, so useG8() never throws on its own) */: string;
131
+ domain?: string;
134
132
  name?: string;
135
133
  }): Promise<import("./enrich").CompanyEnrichment>;
136
134
  verifyEmail(email: string): Promise<import("./enrich").EmailVerification>;
@@ -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.293.0";
8
+ export declare const SDK_VERSION = "0.294.1";
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.293.0";
10
+ export declare const SDK_CLIENT_ID = "js-sdk/0.294.1";
package/docs/agents.md CHANGED
@@ -220,7 +220,7 @@ What you must do:
220
220
  - Get a human's confirmation before calling an `external`, `billable` or `destructive` operation, and say
221
221
  what it will do ("this sends the email to 240 contacts").
222
222
  - Keep bulk billable jobs small until the user confirms the cost (a person or company lookup is 2 credits,
223
- charged even when no match is found).
223
+ charged only when a match is found).
224
224
 
225
225
  ## 8. Errors
226
226
 
@@ -376,7 +376,7 @@ for (const person of results.contacts) {
376
376
 
377
377
  ### Enrich one person or company
378
378
 
379
- You have an email, LinkedIn URL, name + company, or a domain and need the full profile. Each lookup costs 2 credits, charged even when no match is found, and an email verify costs 1 (tier `billable`), so the SDK will not blindly retry them on a 5xx.
379
+ You have an email, LinkedIn URL, name + company, or a domain and need the full profile. Each lookup costs 2 credits, charged only when a match is found, and an email verify costs 1 (tier `billable`), so the SDK will not blindly retry them on a 5xx.
380
380
 
381
381
  ```ts
382
382
  import { g8 } from "@graph8/sdk";
@@ -598,7 +598,7 @@ Body fields (`CreateEventTypeRequest`):
598
598
 
599
599
  | Field | Type | Required | Description |
600
600
  |---|---|---|---|
601
- | `body.length` | `integer` | yes | |
601
+ | `body.length` | `integer` | yes | min 5, max 525600 |
602
602
  | `body.slug` | `string` | yes | |
603
603
  | `body.title` | `string` | yes | |
604
604
  | `body.after_event_buffer` | `integer` | no | default `0` |
@@ -636,7 +636,7 @@ Body fields (`CreateEventTypeRequest`):
636
636
  **Example**
637
637
 
638
638
  ```ts
639
- const result = await g8.api.appointments.createEventType({ body: { length: 1, slug: "example", title: "Example" } });
639
+ const result = await g8.api.appointments.createEventType({ body: { length: 5, slug: "example", title: "Example" } });
640
640
  ```
641
641
 
642
642
  ---
@@ -3335,7 +3335,7 @@ Body fields (`UpdateEventTypeRequest`):
3335
3335
  | `body.event_name` | `string \| null` | no | |
3336
3336
  | `body.hidden` | `boolean \| null` | no | |
3337
3337
  | `body.layouts` | `Array<string> \| null` | no | |
3338
- | `body.length` | `integer \| null` | no | |
3338
+ | `body.length` | `integer \| null` | no | min 5, max 525600 |
3339
3339
  | `body.locations` | `Array<Record<string, unknown>> \| null` | no | |
3340
3340
  | `body.metadata` | `Record<string, unknown> \| null` | no | |
3341
3341
  | `body.minimum_booking_notice` | `integer \| null` | no | |
@@ -852,7 +852,7 @@ export interface ContactsOperations {
852
852
  name?: string | null;
853
853
  /** Filter by job title (partial match) */
854
854
  job_title?: string | null;
855
- /** Filter by seniority level (exact match, case-insensitive). Spellings of the same level match each other: VP = Vice President; SVP/EVP = SVP = EVP = Senior/Executive Vice President; C-Suite = C-Level = CXO. Pass several levels comma-separated to match any of them, e.g. `VP,SVP/EVP`. */
855
+ /** Filter by seniority level (exact match, case-insensitive). Spellings of the same level match each other: VP = Vice President; SVP/EVP = SVP = EVP = Senior/Executive Vice President; C-Suite = C-Level = CXO. `VP` (or `Vice President`) means VP and above, so it also returns the SVP/EVP band; `SVP/EVP` alone returns only that band. Pass several levels comma-separated to match any of them, e.g. `Director,VP`. */
856
856
  seniority_level?: string | null;
857
857
  /** Filter by company name (partial match) */
858
858
  company_name?: string | null;
@@ -1887,7 +1887,7 @@ List contacts with optional filtering and pagination.
1887
1887
  | `query.list_id` | `integer \| null` | no | Filter by list ID |
1888
1888
  | `query.name` | `string \| null` | no | Filter by first or last name (partial match) |
1889
1889
  | `query.job_title` | `string \| null` | no | Filter by job title (partial match) |
1890
- | `query.seniority_level` | `string \| null` | no | Filter by seniority level (exact match, case-insensitive). Spellings of the same level match each other: VP = Vice President; SVP/EVP = SVP = EVP = Senior/Executive Vice President; C-Suite = C-Level = CXO. Pass several levels comma-separated to match any of them, e.g. `VP,SVP/EVP`. |
1890
+ | `query.seniority_level` | `string \| null` | no | Filter by seniority level (exact match, case-insensitive). Spellings of the same level match each other: VP = Vice President; SVP/EVP = SVP = EVP = Senior/Executive Vice President; C-Suite = C-Level = CXO. `VP` (or `Vice President`) means VP and above, so it also returns the SVP/EVP band; `SVP/EVP` alone returns only that band. Pass several levels comma-separated to match any of them, e.g. `Direc… |
1891
1891
  | `query.company_name` | `string \| null` | no | Filter by company name (partial match) |
1892
1892
  | `query.company_id` | `integer \| null` | no | Filter by company ID |
1893
1893
  | `query.country` | `string \| null` | no | Filter by country (exact match, case-insensitive; surrounding spaces ignored). Common aliases match each other: United States = US = USA; United Kingdom = UK. |
@@ -379,7 +379,6 @@ export interface QuotesOperations {
379
379
  get_company_revenue_summary_stripe_companies__company_id__revenue_summary_get: {
380
380
  input: {
381
381
  path: {
382
- /** graph8 company id. */
383
382
  company_id: number;
384
383
  };
385
384
  headers?: {
@@ -396,7 +395,6 @@ export interface QuotesOperations {
396
395
  get_company_stripe_invoices_stripe_companies__company_id__invoices_get: {
397
396
  input: {
398
397
  path: {
399
- /** graph8 company id. */
400
398
  company_id: number;
401
399
  };
402
400
  query?: {
@@ -418,7 +416,6 @@ export interface QuotesOperations {
418
416
  get_company_stripe_subscriptions_stripe_companies__company_id__subscriptions_get: {
419
417
  input: {
420
418
  path: {
421
- /** graph8 company id. */
422
419
  company_id: number;
423
420
  };
424
421
  headers?: {
@@ -898,7 +898,7 @@ Total paid, MRR, invoice count and customer-since date for one company.
898
898
 
899
899
  | Field | Type | Required | Description |
900
900
  |---|---|---|---|
901
- | `path.company_id` | `integer` | yes | graph8 company id. |
901
+ | `path.company_id` | `integer` | yes | |
902
902
 
903
903
  **Returns** `ApiResponse_BillingPayload_`: the envelope `{ data: BillingPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
904
904
 
@@ -929,7 +929,7 @@ A company's Stripe invoice history, newest first.
929
929
 
930
930
  | Field | Type | Required | Description |
931
931
  |---|---|---|---|
932
- | `path.company_id` | `integer` | yes | graph8 company id. |
932
+ | `path.company_id` | `integer` | yes | |
933
933
  | `query.page` | `integer` | no | 1-based page. default `1` |
934
934
  | `query.limit` | `integer` | no | default `50` |
935
935
 
@@ -968,7 +968,7 @@ A company's current Stripe subscriptions, through its customer mapping.
968
968
 
969
969
  | Field | Type | Required | Description |
970
970
  |---|---|---|---|
971
- | `path.company_id` | `integer` | yes | graph8 company id. |
971
+ | `path.company_id` | `integer` | yes | |
972
972
 
973
973
  **Returns** `ApiResponse_BillingListPayload_`: the envelope `{ data: BillingListPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
974
974
 
@@ -1320,7 +1320,7 @@ Types: `dist/types/enrich.d.ts`
1320
1320
  g8.enrich.company: (params: { domain?: string; name?: string; }) => Promise<CompanyEnrichment>
1321
1321
  ```
1322
1322
 
1323
- Look up a company by domain or name. Costs 2 credits per lookup, charged even when no match is found (`found: false`).
1323
+ Look up a company by domain or name. Costs 2 credits per lookup, charged only when a match is found (`found: false` costs nothing).
1324
1324
 
1325
1325
  - Calls `POST /api/v1/enrichment/lookup/company` ([`g8.api.enrichment.lookupCompany`](api/enrichment.md#op-lookupcompany), tier `billable`, scope `enrichment:run`)
1326
1326
 
@@ -1334,7 +1334,7 @@ Look up a company by domain or name. Costs 2 credits per lookup, charged even wh
1334
1334
  g8.enrich.person: (params: { email?: string; linkedin_url?: string; first_name?: string; last_name?: string; company_domain?: string; }) => Promise<PersonEnrichment>
1335
1335
  ```
1336
1336
 
1337
- Look up a person by email, LinkedIn, or name + company. Costs 2 credits per lookup, charged even when no match is found (`found: false`).
1337
+ Look up a person by email, LinkedIn, or name + company. Costs 2 credits per lookup, charged only when a match is found (`found: false` costs nothing).
1338
1338
 
1339
1339
  - Calls `POST /api/v1/enrichment/lookup/person` ([`g8.api.enrichment.lookupPerson`](api/enrichment.md#op-lookupperson), tier `billable`, scope `enrichment:run`)
1340
1340
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graph8/sdk",
3
- "version": "0.293.0",
3
+ "version": "0.294.1",
4
4
  "description": "graph8 SDK - CRM, enrichment, sequences, campaigns, and tracking for B2B",
5
5
  "license": "MIT",
6
6
  "author": "graph8 <support@graph8.com> (https://graph8.com)",