higherdata-sdk 0.6.0 → 0.7.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.
Files changed (3) hide show
  1. package/dist/index.d.ts +609 -205
  2. package/dist/index.js +325 -101
  3. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -63,9 +63,12 @@ var TOOL_NAMES = [
63
63
  "jobs.list",
64
64
  "lists.add",
65
65
  "lists.create",
66
+ "lists.delete",
66
67
  "lists.export",
67
68
  "lists.get",
68
69
  "lists.refresh",
70
+ "lists.remove",
71
+ "lists.rename",
69
72
  "lists.run",
70
73
  "lists.status",
71
74
  "lookup.company",
@@ -273,7 +276,7 @@ var TOOL_CATALOG = [
273
276
  },
274
277
  {
275
278
  "name": "account.limits",
276
- "description": "Returns the current plan rate limits, concurrency and monthly email verification allowance.",
279
+ "description": "Returns the current plan rate limits, concurrency and available purchased verify credit balance.",
277
280
  "risk": "read",
278
281
  "scopes": [],
279
282
  "input": {
@@ -458,7 +461,7 @@ var TOOL_CATALOG = [
458
461
  },
459
462
  {
460
463
  "name": "account.usage",
461
- "description": "Returns monthly activity, the email verification allowance and its reset time.",
464
+ "description": "Returns monthly activity, the available purchased verify credit balance.",
462
465
  "risk": "read",
463
466
  "scopes": [],
464
467
  "input": {
@@ -1921,7 +1924,7 @@ var TOOL_CATALOG = [
1921
1924
  },
1922
1925
  {
1923
1926
  "name": "email.find",
1924
- "description": "Find a person's work email from company pattern evidence. Tries at most three candidates in order and stops at the first deliverable. Dry run only plans candidates. Use the returned requestId to read or continue pending work.",
1927
+ "description": "Find a person's work email from company pattern evidence. Tries at most three candidates in order and stops at the first deliverable. At zero verify credits, returns the best available pattern guess marked unverified. Dry run only plans candidates. Use the returned requestId to read or continue pending work.",
1925
1928
  "risk": "read",
1926
1929
  "scopes": [
1927
1930
  "data:read"
@@ -1932,6 +1935,11 @@ var TOOL_CATALOG = [
1932
1935
  {
1933
1936
  "type": "object",
1934
1937
  "properties": {
1938
+ "personId": {
1939
+ "description": "Stable person id to attach the verified email to.",
1940
+ "type": "string",
1941
+ "pattern": "^hdp_[0-9a-f]{32}$"
1942
+ },
1935
1943
  "firstName": {
1936
1944
  "type": "string",
1937
1945
  "minLength": 1,
@@ -1970,6 +1978,11 @@ var TOOL_CATALOG = [
1970
1978
  "minLength": 1,
1971
1979
  "maxLength": 240
1972
1980
  },
1981
+ "linkedinUrl": {
1982
+ "description": "LinkedIn company page URL.",
1983
+ "type": "string",
1984
+ "maxLength": 2048
1985
+ },
1973
1986
  "city": {
1974
1987
  "description": "City of the headquarters.",
1975
1988
  "type": "string",
@@ -2519,7 +2532,7 @@ var TOOL_CATALOG = [
2519
2532
  }
2520
2533
  },
2521
2534
  "additionalProperties": false,
2522
- "description": "Company to match. Supply an id, a domain, or a name."
2535
+ "description": "Company to match. Supply an id, a domain, a LinkedIn URL, or a name."
2523
2536
  }
2524
2537
  },
2525
2538
  "required": [
@@ -2549,7 +2562,7 @@ var TOOL_CATALOG = [
2549
2562
  },
2550
2563
  {
2551
2564
  "name": "email.verify",
2552
- "description": "Verify one email address. Dry run spends nothing. Returns a requestId for pending work; call this tool with requestId to read or continue it. Verification results use deliverable, undeliverable, risky or unknown.",
2565
+ "description": "Verify one email address not already held for a contact. API callers may explicitly pass force to verify an existing address. Provider answers use purchased verify credits; cached answers are free. Dry run spends nothing. Returns a requestId for pending work; call this tool with requestId to read or continue it. Verification results use deliverable, undeliverable, risky or unknown.",
2553
2566
  "risk": "read",
2554
2567
  "scopes": [
2555
2568
  "data:read"
@@ -2560,12 +2573,21 @@ var TOOL_CATALOG = [
2560
2573
  {
2561
2574
  "type": "object",
2562
2575
  "properties": {
2576
+ "personId": {
2577
+ "description": "Stable person id to attach the verified email to.",
2578
+ "type": "string",
2579
+ "pattern": "^hdp_[0-9a-f]{32}$"
2580
+ },
2563
2581
  "email": {
2564
2582
  "type": "string",
2565
2583
  "maxLength": 320,
2566
2584
  "format": "email",
2567
2585
  "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
2568
2586
  "description": "Work email address to verify."
2587
+ },
2588
+ "force": {
2589
+ "description": "API override to verify an address already held for a contact. Not offered in the UI.",
2590
+ "type": "boolean"
2569
2591
  }
2570
2592
  },
2571
2593
  "required": [
@@ -2774,7 +2796,7 @@ var TOOL_CATALOG = [
2774
2796
  },
2775
2797
  {
2776
2798
  "name": "enrich.company",
2777
- "description": "Compare a company record with HigherData Core, using stable id, exact domain, then exact name and location. Name matches always require review. Dry run returns comparisons without recording them. Insights fields and filters require the Insights or Unlimited plan.",
2799
+ "description": "Compare a company record with HigherData Core, using stable id, LinkedIn URL, exact domain, then exact name and location. Name matches always require review. Dry run returns comparisons without recording them. Insights fields and filters require the Insights or Complete plan.",
2778
2800
  "risk": "write_local",
2779
2801
  "scopes": [
2780
2802
  "data:read",
@@ -2801,6 +2823,11 @@ var TOOL_CATALOG = [
2801
2823
  "minLength": 1,
2802
2824
  "maxLength": 240
2803
2825
  },
2826
+ "linkedinUrl": {
2827
+ "description": "LinkedIn company page URL.",
2828
+ "type": "string",
2829
+ "maxLength": 2048
2830
+ },
2804
2831
  "city": {
2805
2832
  "description": "City of the headquarters.",
2806
2833
  "type": "string",
@@ -3350,7 +3377,7 @@ var TOOL_CATALOG = [
3350
3377
  }
3351
3378
  },
3352
3379
  "additionalProperties": false,
3353
- "description": "Company to match. Supply an id, a domain, or a name."
3380
+ "description": "Company to match. Supply an id, a domain, a LinkedIn URL, or a name."
3354
3381
  }
3355
3382
  },
3356
3383
  {
@@ -3424,8 +3451,7 @@ var TOOL_CATALOG = [
3424
3451
  "linkedinUrl": {
3425
3452
  "description": "LinkedIn person profile URL.",
3426
3453
  "type": "string",
3427
- "maxLength": 2048,
3428
- "format": "uri"
3454
+ "maxLength": 2048
3429
3455
  },
3430
3456
  "name": {
3431
3457
  "description": "Person's full name.",
@@ -3434,7 +3460,7 @@ var TOOL_CATALOG = [
3434
3460
  "maxLength": 240
3435
3461
  },
3436
3462
  "company": {
3437
- "description": "Company this person works at. Supply an id, a domain, or a name.",
3463
+ "description": "Company this person works at. Supply an id, a domain, a LinkedIn URL, or a name.",
3438
3464
  "type": "object",
3439
3465
  "properties": {
3440
3466
  "id": {
@@ -3454,6 +3480,11 @@ var TOOL_CATALOG = [
3454
3480
  "minLength": 1,
3455
3481
  "maxLength": 240
3456
3482
  },
3483
+ "linkedinUrl": {
3484
+ "description": "LinkedIn company page URL.",
3485
+ "type": "string",
3486
+ "maxLength": 2048
3487
+ },
3457
3488
  "city": {
3458
3489
  "description": "City of the headquarters.",
3459
3490
  "type": "string",
@@ -5943,31 +5974,29 @@ var TOOL_CATALOG = [
5943
5974
  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
5944
5975
  },
5945
5976
  "titleKeywords": {
5946
- "description": "Job title keywords to match. A person can match any of them.",
5977
+ "description": "Job title keywords to match, at least 3 characters each after trimming. A person can match any of them.",
5947
5978
  "minItems": 1,
5948
5979
  "maxItems": 50,
5949
5980
  "type": "array",
5950
5981
  "items": {
5951
5982
  "type": "string",
5952
- "minLength": 1,
5953
- "maxLength": 120,
5954
- "pattern": "\\S"
5983
+ "minLength": 3,
5984
+ "maxLength": 120
5955
5985
  }
5956
5986
  },
5957
5987
  "requiredTitleKeywords": {
5958
- "description": "Job title keywords the person must match.",
5988
+ "description": "Job title keywords the person must match, at least 3 characters each after trimming.",
5959
5989
  "minItems": 1,
5960
5990
  "maxItems": 50,
5961
5991
  "type": "array",
5962
5992
  "items": {
5963
5993
  "type": "string",
5964
- "minLength": 1,
5965
- "maxLength": 120,
5966
- "pattern": "\\S"
5994
+ "minLength": 3,
5995
+ "maxLength": 120
5967
5996
  }
5968
5997
  },
5969
5998
  "requiredTitleKeywordGroups": {
5970
- "description": "Job title keyword groups. The person must match every group, and any keyword inside a group.",
5999
+ "description": "Job title keyword groups, at least 3 characters per keyword after trimming. The person must match every group, and any keyword inside a group.",
5971
6000
  "maxItems": 10,
5972
6001
  "type": "array",
5973
6002
  "items": {
@@ -5976,22 +6005,20 @@ var TOOL_CATALOG = [
5976
6005
  "type": "array",
5977
6006
  "items": {
5978
6007
  "type": "string",
5979
- "minLength": 1,
5980
- "maxLength": 120,
5981
- "pattern": "\\S"
6008
+ "minLength": 3,
6009
+ "maxLength": 120
5982
6010
  }
5983
6011
  }
5984
6012
  },
5985
6013
  "excludeTitleKeywords": {
5986
- "description": "Job title keywords that remove a person.",
6014
+ "description": "Job title keywords that remove a person, at least 3 characters each after trimming.",
5987
6015
  "minItems": 1,
5988
6016
  "maxItems": 50,
5989
6017
  "type": "array",
5990
6018
  "items": {
5991
6019
  "type": "string",
5992
- "minLength": 1,
5993
- "maxLength": 120,
5994
- "pattern": "\\S"
6020
+ "minLength": 3,
6021
+ "maxLength": 120
5995
6022
  }
5996
6023
  },
5997
6024
  "jobFunctions": {
@@ -6108,6 +6135,14 @@ var TOOL_CATALOG = [
6108
6135
  "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
6109
6136
  }
6110
6137
  },
6138
+ "sort": {
6139
+ "description": "Sort by primary company employee estimate, largest or smallest first. Unknown sizes come last. Available from the November 2026 release.",
6140
+ "type": "string",
6141
+ "enum": [
6142
+ "company_size_desc",
6143
+ "company_size_asc"
6144
+ ]
6145
+ },
6111
6146
  "firstName": {
6112
6147
  "description": "First name tokens, using accent-folded fuzzy matching. Requires companyId.",
6113
6148
  "type": "string",
@@ -6234,9 +6269,34 @@ var TOOL_CATALOG = [
6234
6269
  "additionalProperties": false
6235
6270
  }
6236
6271
  },
6272
+ {
6273
+ "name": "lists.delete",
6274
+ "description": "Delete a saved list and its membership and refresh history. Records and CRM data are unchanged. Dry run previews the deletion.",
6275
+ "risk": "destructive",
6276
+ "scopes": [
6277
+ "data:read",
6278
+ "data:write"
6279
+ ],
6280
+ "input": {
6281
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
6282
+ "type": "object",
6283
+ "properties": {
6284
+ "id": {
6285
+ "type": "string",
6286
+ "format": "uuid",
6287
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
6288
+ "description": "Saved list id in the current space."
6289
+ }
6290
+ },
6291
+ "required": [
6292
+ "id"
6293
+ ],
6294
+ "additionalProperties": false
6295
+ }
6296
+ },
6237
6297
  {
6238
6298
  "name": "lists.export",
6239
- "description": "Export a saved list as paged CSV or JSONL with opaque ids. CSV escapes spreadsheet formulas. Pages contain at most 50 records.Insights fields and filters require the Insights or Unlimited plan.",
6299
+ "description": "Export a saved list as paged CSV or JSONL with opaque ids. CSV escapes spreadsheet formulas. Pages contain at most 50 records.Insights fields and filters require the Insights or Complete plan.",
6240
6300
  "risk": "read",
6241
6301
  "scopes": [
6242
6302
  "data:read"
@@ -6321,6 +6381,15 @@ var TOOL_CATALOG = [
6321
6381
  "type": "string",
6322
6382
  "format": "uuid",
6323
6383
  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
6384
+ },
6385
+ "sort": {
6386
+ "description": "List records sorted by name or date added.",
6387
+ "type": "string",
6388
+ "enum": [
6389
+ "name_asc",
6390
+ "name_desc",
6391
+ "added_desc"
6392
+ ]
6324
6393
  }
6325
6394
  },
6326
6395
  "additionalProperties": false
@@ -6358,6 +6427,75 @@ var TOOL_CATALOG = [
6358
6427
  "additionalProperties": false
6359
6428
  }
6360
6429
  },
6430
+ {
6431
+ "name": "lists.remove",
6432
+ "description": "Remove up to 50 saved row ids from a list. A later dynamic refresh may add matching records again. Dry run previews the removal count.",
6433
+ "risk": "destructive",
6434
+ "scopes": [
6435
+ "data:read",
6436
+ "data:write"
6437
+ ],
6438
+ "input": {
6439
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
6440
+ "type": "object",
6441
+ "properties": {
6442
+ "id": {
6443
+ "type": "string",
6444
+ "format": "uuid",
6445
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
6446
+ "description": "Saved list id in the current space."
6447
+ },
6448
+ "ids": {
6449
+ "minItems": 1,
6450
+ "maxItems": 50,
6451
+ "type": "array",
6452
+ "items": {
6453
+ "type": "string",
6454
+ "format": "uuid",
6455
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
6456
+ },
6457
+ "description": "Saved row ids returned by lists.get, at most 50 per call."
6458
+ }
6459
+ },
6460
+ "required": [
6461
+ "id",
6462
+ "ids"
6463
+ ],
6464
+ "additionalProperties": false
6465
+ }
6466
+ },
6467
+ {
6468
+ "name": "lists.rename",
6469
+ "description": "Rename a saved list. Dry run previews the name.",
6470
+ "risk": "write_local",
6471
+ "scopes": [
6472
+ "data:read",
6473
+ "data:write"
6474
+ ],
6475
+ "input": {
6476
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
6477
+ "type": "object",
6478
+ "properties": {
6479
+ "id": {
6480
+ "type": "string",
6481
+ "format": "uuid",
6482
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
6483
+ "description": "Saved list id in the current space."
6484
+ },
6485
+ "name": {
6486
+ "type": "string",
6487
+ "minLength": 1,
6488
+ "maxLength": 80,
6489
+ "description": "New name for the saved list."
6490
+ }
6491
+ },
6492
+ "required": [
6493
+ "id",
6494
+ "name"
6495
+ ],
6496
+ "additionalProperties": false
6497
+ }
6498
+ },
6361
6499
  {
6362
6500
  "name": "lists.run",
6363
6501
  "description": "Queue a background preview or refresh. Only one job runs per list. Owners and admins can refresh dynamic lists now, including the current release. Dry run reports the proposed release without queueing.",
@@ -6425,7 +6563,7 @@ var TOOL_CATALOG = [
6425
6563
  },
6426
6564
  {
6427
6565
  "name": "lookup.company",
6428
- "description": "Look up a company by exactly one domain, exact or near name (optionally with location), or opaque hdo_ id. Returns bounded candidates and ambiguity metadata. Insights fields and filters require the Insights or Unlimited plan.",
6566
+ "description": "Look up a company by exactly one domain, exact or near name (optionally with location), LinkedIn company page URL, or opaque hdo_ id, or up to 100 ids. Returns bounded candidates and ambiguity metadata. Insights fields and filters require the Insights or Complete plan.",
6429
6567
  "risk": "read",
6430
6568
  "scopes": [
6431
6569
  "data:read"
@@ -6450,7 +6588,7 @@ var TOOL_CATALOG = [
6450
6588
  "maximum": 5
6451
6589
  },
6452
6590
  "excludeListId": {
6453
- "description": "Saved list whose members are left out of the result.",
6591
+ "description": "Ignore one suppression list for this call only, tenant owner only. Allowed kinds: customers, open_deals, competitors, partners, employees, custom. Do not contact, opt-out and global erasure rules cannot be lifted.",
6454
6592
  "type": "string",
6455
6593
  "format": "uuid",
6456
6594
  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
@@ -6493,7 +6631,7 @@ var TOOL_CATALOG = [
6493
6631
  "maximum": 5
6494
6632
  },
6495
6633
  "excludeListId": {
6496
- "description": "Saved list whose members are left out of the result.",
6634
+ "description": "Ignore one suppression list for this call only, tenant owner only. Allowed kinds: customers, open_deals, competitors, partners, employees, custom. Do not contact, opt-out and global erasure rules cannot be lifted.",
6497
6635
  "type": "string",
6498
6636
  "format": "uuid",
6499
6637
  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
@@ -6513,7 +6651,7 @@ var TOOL_CATALOG = [
6513
6651
  "description": "Opaque company id (hdo_)."
6514
6652
  },
6515
6653
  "excludeListId": {
6516
- "description": "Saved list whose members are left out of the result.",
6654
+ "description": "Ignore one suppression list for this call only, tenant owner only. Allowed kinds: customers, open_deals, competitors, partners, employees, custom. Do not contact, opt-out and global erasure rules cannot be lifted.",
6517
6655
  "type": "string",
6518
6656
  "format": "uuid",
6519
6657
  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
@@ -6523,6 +6661,59 @@ var TOOL_CATALOG = [
6523
6661
  "id"
6524
6662
  ],
6525
6663
  "additionalProperties": false
6664
+ },
6665
+ {
6666
+ "type": "object",
6667
+ "properties": {
6668
+ "ids": {
6669
+ "minItems": 1,
6670
+ "maxItems": 100,
6671
+ "type": "array",
6672
+ "items": {
6673
+ "type": "string",
6674
+ "pattern": "^hdo_[0-9a-f]{32}$",
6675
+ "description": "Opaque company id (hdo_)."
6676
+ },
6677
+ "description": "Look up up to 100 opaque company ids in one call."
6678
+ },
6679
+ "excludeListId": {
6680
+ "description": "Ignore one suppression list for this call only, tenant owner only. Allowed kinds: customers, open_deals, competitors, partners, employees, custom. Do not contact, opt-out and global erasure rules cannot be lifted.",
6681
+ "type": "string",
6682
+ "format": "uuid",
6683
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
6684
+ }
6685
+ },
6686
+ "required": [
6687
+ "ids"
6688
+ ],
6689
+ "additionalProperties": false
6690
+ },
6691
+ {
6692
+ "type": "object",
6693
+ "properties": {
6694
+ "linkedinUrl": {
6695
+ "type": "string",
6696
+ "maxLength": 2048,
6697
+ "description": "LinkedIn company page URL."
6698
+ },
6699
+ "candidateLimit": {
6700
+ "default": 5,
6701
+ "description": "Maximum candidates to return.",
6702
+ "type": "integer",
6703
+ "minimum": 1,
6704
+ "maximum": 5
6705
+ },
6706
+ "excludeListId": {
6707
+ "description": "Ignore one suppression list for this call only, tenant owner only. Allowed kinds: customers, open_deals, competitors, partners, employees, custom. Do not contact, opt-out and global erasure rules cannot be lifted.",
6708
+ "type": "string",
6709
+ "format": "uuid",
6710
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
6711
+ }
6712
+ },
6713
+ "required": [
6714
+ "linkedinUrl"
6715
+ ],
6716
+ "additionalProperties": false
6526
6717
  }
6527
6718
  ]
6528
6719
  }
@@ -6538,6 +6729,12 @@ var TOOL_CATALOG = [
6538
6729
  "$schema": "https://json-schema.org/draft/2020-12/schema",
6539
6730
  "type": "object",
6540
6731
  "properties": {
6732
+ "excludeListId": {
6733
+ "description": "Ignore one suppression list for this call only, tenant owner only. Allowed kinds: customers, open_deals, competitors, partners, employees, custom. Do not contact, opt-out and global erasure rules cannot be lifted.",
6734
+ "type": "string",
6735
+ "format": "uuid",
6736
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
6737
+ },
6541
6738
  "companyId": {
6542
6739
  "description": "Select a company from a previous ambiguous company-scoped lookup.",
6543
6740
  "type": "string",
@@ -6584,7 +6781,7 @@ var TOOL_CATALOG = [
6584
6781
  "maximum": 5
6585
6782
  },
6586
6783
  "excludeListId": {
6587
- "description": "Saved list whose members are left out of the result.",
6784
+ "description": "Ignore one suppression list for this call only, tenant owner only. Allowed kinds: customers, open_deals, competitors, partners, employees, custom. Do not contact, opt-out and global erasure rules cannot be lifted.",
6588
6785
  "type": "string",
6589
6786
  "format": "uuid",
6590
6787
  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
@@ -6611,7 +6808,7 @@ var TOOL_CATALOG = [
6611
6808
  "maximum": 5
6612
6809
  },
6613
6810
  "excludeListId": {
6614
- "description": "Saved list whose members are left out of the result.",
6811
+ "description": "Ignore one suppression list for this call only, tenant owner only. Allowed kinds: customers, open_deals, competitors, partners, employees, custom. Do not contact, opt-out and global erasure rules cannot be lifted.",
6615
6812
  "type": "string",
6616
6813
  "format": "uuid",
6617
6814
  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
@@ -6651,7 +6848,7 @@ var TOOL_CATALOG = [
6651
6848
  "maximum": 20
6652
6849
  },
6653
6850
  "excludeListId": {
6654
- "description": "Saved list whose members are left out of the result.",
6851
+ "description": "Ignore one suppression list for this call only, tenant owner only. Allowed kinds: customers, open_deals, competitors, partners, employees, custom. Do not contact, opt-out and global erasure rules cannot be lifted.",
6655
6852
  "type": "string",
6656
6853
  "format": "uuid",
6657
6854
  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
@@ -6668,7 +6865,6 @@ var TOOL_CATALOG = [
6668
6865
  "linkedinUrl": {
6669
6866
  "type": "string",
6670
6867
  "maxLength": 2048,
6671
- "format": "uri",
6672
6868
  "description": "LinkedIn person profile URL."
6673
6869
  },
6674
6870
  "candidateLimit": {
@@ -6679,7 +6875,7 @@ var TOOL_CATALOG = [
6679
6875
  "maximum": 5
6680
6876
  },
6681
6877
  "excludeListId": {
6682
- "description": "Saved list whose members are left out of the result.",
6878
+ "description": "Ignore one suppression list for this call only, tenant owner only. Allowed kinds: customers, open_deals, competitors, partners, employees, custom. Do not contact, opt-out and global erasure rules cannot be lifted.",
6683
6879
  "type": "string",
6684
6880
  "format": "uuid",
6685
6881
  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
@@ -6706,10 +6902,14 @@ var TOOL_CATALOG = [
6706
6902
  "maximum": 5
6707
6903
  },
6708
6904
  "excludeListId": {
6709
- "description": "Saved list whose members are left out of the result.",
6905
+ "description": "Ignore one suppression list for this call only, tenant owner only. Allowed kinds: customers, open_deals, competitors, partners, employees, custom. Do not contact, opt-out and global erasure rules cannot be lifted.",
6710
6906
  "type": "string",
6711
6907
  "format": "uuid",
6712
6908
  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
6909
+ },
6910
+ "includeEmployment": {
6911
+ "description": "Include current and past jobs for this person, with suppression applied to each job.",
6912
+ "type": "boolean"
6713
6913
  }
6714
6914
  },
6715
6915
  "required": [
@@ -6722,7 +6922,7 @@ var TOOL_CATALOG = [
6722
6922
  },
6723
6923
  {
6724
6924
  "name": "search.companies",
6725
- "description": "Find companies in HigherData Core using explicit filters. Optional domain uses exact website-host matching and ranks root sites first. Pages contain at most 50 records and opaque ids. Insights fields and filters require the Insights or Unlimited plan.",
6925
+ "description": "Find companies in HigherData Core using explicit filters. Optional domain uses exact website-host matching and ranks root sites first. Interactive pages contain at most 50 records. A download (download: true) contains at most 500 records and opaque ids. Insights fields and filters require the Insights or Complete plan.",
6726
6926
  "risk": "read",
6727
6927
  "scopes": [
6728
6928
  "data:read"
@@ -7073,10 +7273,10 @@ var TOOL_CATALOG = [
7073
7273
  },
7074
7274
  "limit": {
7075
7275
  "default": 50,
7076
- "description": "Maximum records in this page.",
7276
+ "description": "Maximum records in this page. Interactive search accepts at most 50. A download (download true) accepts at most 500.",
7077
7277
  "type": "integer",
7078
7278
  "minimum": 1,
7079
- "maximum": 50
7279
+ "maximum": 500
7080
7280
  },
7081
7281
  "cursor": {
7082
7282
  "description": "Cursor from the previous page. Omit it for the first page.",
@@ -7766,10 +7966,14 @@ var TOOL_CATALOG = [
7766
7966
  "additionalProperties": false
7767
7967
  },
7768
7968
  "excludeListId": {
7769
- "description": "Saved list whose members are left out of the result.",
7969
+ "description": "Ignore one suppression list for this call only, tenant owner only. Allowed kinds: customers, open_deals, competitors, partners, employees, custom. Do not contact, opt-out and global erasure rules cannot be lifted.",
7770
7970
  "type": "string",
7771
7971
  "format": "uuid",
7772
7972
  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
7973
+ },
7974
+ "download": {
7975
+ "description": "Set true to download a page. Interactive search stays at 50 records. The server reads this flag from the request, not from a plan or role.",
7976
+ "type": "boolean"
7773
7977
  }
7774
7978
  },
7775
7979
  "additionalProperties": false
@@ -8813,7 +9017,7 @@ var TOOL_CATALOG = [
8813
9017
  },
8814
9018
  {
8815
9019
  "name": "search.count_people",
8816
- "description": "Count people once by primary current job before suppression using release-built aggregates; search results may match other current jobs. Unsupported refinements return a qualified baseline. exact: true explicitly requests one capped detailed count of matching people; never use it for live filtering.",
9020
+ "description": "Count people once by primary current job before suppression using the search index; search results may match other current jobs. Title keywords, required titles, title groups or seniorities can be used without company filters. Empty and exclusion-only counts are rejected. Broad counts are approximate. exact: true explicitly requests one capped detailed count of matching people; never use it for live filtering.",
8817
9021
  "risk": "read",
8818
9022
  "scopes": [
8819
9023
  "data:read"
@@ -9297,31 +9501,29 @@ var TOOL_CATALOG = [
9297
9501
  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
9298
9502
  },
9299
9503
  "titleKeywords": {
9300
- "description": "Job title keywords to match. A person can match any of them.",
9504
+ "description": "Job title keywords to match, at least 3 characters each after trimming. A person can match any of them.",
9301
9505
  "minItems": 1,
9302
9506
  "maxItems": 50,
9303
9507
  "type": "array",
9304
9508
  "items": {
9305
9509
  "type": "string",
9306
- "minLength": 1,
9307
- "maxLength": 120,
9308
- "pattern": "\\S"
9510
+ "minLength": 3,
9511
+ "maxLength": 120
9309
9512
  }
9310
9513
  },
9311
9514
  "requiredTitleKeywords": {
9312
- "description": "Job title keywords the person must match.",
9515
+ "description": "Job title keywords the person must match, at least 3 characters each after trimming.",
9313
9516
  "minItems": 1,
9314
9517
  "maxItems": 50,
9315
9518
  "type": "array",
9316
9519
  "items": {
9317
9520
  "type": "string",
9318
- "minLength": 1,
9319
- "maxLength": 120,
9320
- "pattern": "\\S"
9521
+ "minLength": 3,
9522
+ "maxLength": 120
9321
9523
  }
9322
9524
  },
9323
9525
  "requiredTitleKeywordGroups": {
9324
- "description": "Job title keyword groups. The person must match every group, and any keyword inside a group.",
9526
+ "description": "Job title keyword groups, at least 3 characters per keyword after trimming. The person must match every group, and any keyword inside a group.",
9325
9527
  "maxItems": 10,
9326
9528
  "type": "array",
9327
9529
  "items": {
@@ -9330,22 +9532,20 @@ var TOOL_CATALOG = [
9330
9532
  "type": "array",
9331
9533
  "items": {
9332
9534
  "type": "string",
9333
- "minLength": 1,
9334
- "maxLength": 120,
9335
- "pattern": "\\S"
9535
+ "minLength": 3,
9536
+ "maxLength": 120
9336
9537
  }
9337
9538
  }
9338
9539
  },
9339
9540
  "excludeTitleKeywords": {
9340
- "description": "Job title keywords that remove a person.",
9541
+ "description": "Job title keywords that remove a person, at least 3 characters each after trimming.",
9341
9542
  "minItems": 1,
9342
9543
  "maxItems": 50,
9343
9544
  "type": "array",
9344
9545
  "items": {
9345
9546
  "type": "string",
9346
- "minLength": 1,
9347
- "maxLength": 120,
9348
- "pattern": "\\S"
9547
+ "minLength": 3,
9548
+ "maxLength": 120
9349
9549
  }
9350
9550
  },
9351
9551
  "jobFunctions": {
@@ -9528,7 +9728,7 @@ var TOOL_CATALOG = [
9528
9728
  },
9529
9729
  "exact": {
9530
9730
  "default": false,
9531
- "description": "Explicitly run a detailed capped count instead of a rollup estimate. Never enable for live filtering.",
9731
+ "description": "Explicitly request a detailed count when an indexed count is unavailable. Never enable for live filtering.",
9532
9732
  "type": "boolean"
9533
9733
  }
9534
9734
  },
@@ -9639,7 +9839,7 @@ var TOOL_CATALOG = [
9639
9839
  },
9640
9840
  {
9641
9841
  "name": "search.people",
9642
- "description": "Find people in HigherData Core, with 1 to 5 positive company HQ country codes or industries required unless a company id, company name, domain or indexed email scopes the search. Unscoped person names use indexed tokens and bounded, ranked pages. Person, job and company location use distinct filters; each city filter requires its corresponding country. Company-scoped contacts also support legacy contactLocation filters. Pages contain at most 50 people and opaque ids. ",
9842
+ "description": "Find people in HigherData Core. A title keyword, required title, title group or seniority is enough to search without a company filter. Otherwise use 1 to 5 positive company HQ countries or industries, a company id, company name, domain, email or person name. Empty and exclusion-only searches are rejected. Unscoped person names use indexed tokens and bounded, ranked pages. Person, job and company location use distinct filters; each city filter requires its corresponding country. Company-scoped contacts also support legacy contactLocation filters. Interactive pages contain at most 50 people. A download (download: true) contains at most 500 people and opaque ids. ",
9643
9843
  "risk": "read",
9644
9844
  "scopes": [
9645
9845
  "data:read"
@@ -10120,31 +10320,29 @@ var TOOL_CATALOG = [
10120
10320
  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
10121
10321
  },
10122
10322
  "titleKeywords": {
10123
- "description": "Job title keywords to match. A person can match any of them.",
10323
+ "description": "Job title keywords to match, at least 3 characters each after trimming. A person can match any of them.",
10124
10324
  "minItems": 1,
10125
10325
  "maxItems": 50,
10126
10326
  "type": "array",
10127
10327
  "items": {
10128
10328
  "type": "string",
10129
- "minLength": 1,
10130
- "maxLength": 120,
10131
- "pattern": "\\S"
10329
+ "minLength": 3,
10330
+ "maxLength": 120
10132
10331
  }
10133
10332
  },
10134
10333
  "requiredTitleKeywords": {
10135
- "description": "Job title keywords the person must match.",
10334
+ "description": "Job title keywords the person must match, at least 3 characters each after trimming.",
10136
10335
  "minItems": 1,
10137
10336
  "maxItems": 50,
10138
10337
  "type": "array",
10139
10338
  "items": {
10140
10339
  "type": "string",
10141
- "minLength": 1,
10142
- "maxLength": 120,
10143
- "pattern": "\\S"
10340
+ "minLength": 3,
10341
+ "maxLength": 120
10144
10342
  }
10145
10343
  },
10146
10344
  "requiredTitleKeywordGroups": {
10147
- "description": "Job title keyword groups. The person must match every group, and any keyword inside a group.",
10345
+ "description": "Job title keyword groups, at least 3 characters per keyword after trimming. The person must match every group, and any keyword inside a group.",
10148
10346
  "maxItems": 10,
10149
10347
  "type": "array",
10150
10348
  "items": {
@@ -10153,22 +10351,20 @@ var TOOL_CATALOG = [
10153
10351
  "type": "array",
10154
10352
  "items": {
10155
10353
  "type": "string",
10156
- "minLength": 1,
10157
- "maxLength": 120,
10158
- "pattern": "\\S"
10354
+ "minLength": 3,
10355
+ "maxLength": 120
10159
10356
  }
10160
10357
  }
10161
10358
  },
10162
10359
  "excludeTitleKeywords": {
10163
- "description": "Job title keywords that remove a person.",
10360
+ "description": "Job title keywords that remove a person, at least 3 characters each after trimming.",
10164
10361
  "minItems": 1,
10165
10362
  "maxItems": 50,
10166
10363
  "type": "array",
10167
10364
  "items": {
10168
10365
  "type": "string",
10169
- "minLength": 1,
10170
- "maxLength": 120,
10171
- "pattern": "\\S"
10366
+ "minLength": 3,
10367
+ "maxLength": 120
10172
10368
  }
10173
10369
  },
10174
10370
  "jobFunctions": {
@@ -10285,12 +10481,20 @@ var TOOL_CATALOG = [
10285
10481
  "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
10286
10482
  }
10287
10483
  },
10484
+ "sort": {
10485
+ "description": "Sort by primary company employee estimate, largest or smallest first. Unknown sizes come last. Available from the November 2026 release.",
10486
+ "type": "string",
10487
+ "enum": [
10488
+ "company_size_desc",
10489
+ "company_size_asc"
10490
+ ]
10491
+ },
10288
10492
  "limit": {
10289
10493
  "default": 50,
10290
- "description": "Maximum records in this page.",
10494
+ "description": "Maximum records in this page. Interactive search accepts at most 50. A download (download true) accepts at most 500.",
10291
10495
  "type": "integer",
10292
10496
  "minimum": 1,
10293
- "maximum": 50
10497
+ "maximum": 500
10294
10498
  },
10295
10499
  "cursor": {
10296
10500
  "description": "Cursor from the previous page. Omit it for the first page.",
@@ -10359,10 +10563,14 @@ var TOOL_CATALOG = [
10359
10563
  "additionalProperties": false
10360
10564
  },
10361
10565
  "excludeListId": {
10362
- "description": "Saved list whose members are left out of the result.",
10566
+ "description": "Ignore one suppression list for this call only, tenant owner only. Allowed kinds: customers, open_deals, competitors, partners, employees, custom. Do not contact, opt-out and global erasure rules cannot be lifted.",
10363
10567
  "type": "string",
10364
10568
  "format": "uuid",
10365
10569
  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
10570
+ },
10571
+ "download": {
10572
+ "description": "Set true to download a page. Interactive search stays at 50 records. The server reads this flag from the request, not from a plan or role.",
10573
+ "type": "boolean"
10366
10574
  }
10367
10575
  },
10368
10576
  "additionalProperties": false
@@ -12984,31 +13192,29 @@ var TOOL_CATALOG = [
12984
13192
  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
12985
13193
  },
12986
13194
  "titleKeywords": {
12987
- "description": "Job title keywords to match. A person can match any of them.",
13195
+ "description": "Job title keywords to match, at least 3 characters each after trimming. A person can match any of them.",
12988
13196
  "minItems": 1,
12989
13197
  "maxItems": 50,
12990
13198
  "type": "array",
12991
13199
  "items": {
12992
13200
  "type": "string",
12993
- "minLength": 1,
12994
- "maxLength": 120,
12995
- "pattern": "\\S"
13201
+ "minLength": 3,
13202
+ "maxLength": 120
12996
13203
  }
12997
13204
  },
12998
13205
  "requiredTitleKeywords": {
12999
- "description": "Job title keywords the person must match.",
13206
+ "description": "Job title keywords the person must match, at least 3 characters each after trimming.",
13000
13207
  "minItems": 1,
13001
13208
  "maxItems": 50,
13002
13209
  "type": "array",
13003
13210
  "items": {
13004
13211
  "type": "string",
13005
- "minLength": 1,
13006
- "maxLength": 120,
13007
- "pattern": "\\S"
13212
+ "minLength": 3,
13213
+ "maxLength": 120
13008
13214
  }
13009
13215
  },
13010
13216
  "requiredTitleKeywordGroups": {
13011
- "description": "Job title keyword groups. The person must match every group, and any keyword inside a group.",
13217
+ "description": "Job title keyword groups, at least 3 characters per keyword after trimming. The person must match every group, and any keyword inside a group.",
13012
13218
  "maxItems": 10,
13013
13219
  "type": "array",
13014
13220
  "items": {
@@ -13017,22 +13223,20 @@ var TOOL_CATALOG = [
13017
13223
  "type": "array",
13018
13224
  "items": {
13019
13225
  "type": "string",
13020
- "minLength": 1,
13021
- "maxLength": 120,
13022
- "pattern": "\\S"
13226
+ "minLength": 3,
13227
+ "maxLength": 120
13023
13228
  }
13024
13229
  }
13025
13230
  },
13026
13231
  "excludeTitleKeywords": {
13027
- "description": "Job title keywords that remove a person.",
13232
+ "description": "Job title keywords that remove a person, at least 3 characters each after trimming.",
13028
13233
  "minItems": 1,
13029
13234
  "maxItems": 50,
13030
13235
  "type": "array",
13031
13236
  "items": {
13032
13237
  "type": "string",
13033
- "minLength": 1,
13034
- "maxLength": 120,
13035
- "pattern": "\\S"
13238
+ "minLength": 3,
13239
+ "maxLength": 120
13036
13240
  }
13037
13241
  },
13038
13242
  "jobFunctions": {
@@ -13149,6 +13353,14 @@ var TOOL_CATALOG = [
13149
13353
  "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
13150
13354
  }
13151
13355
  },
13356
+ "sort": {
13357
+ "description": "Sort by primary company employee estimate, largest or smallest first. Unknown sizes come last. Available from the November 2026 release.",
13358
+ "type": "string",
13359
+ "enum": [
13360
+ "company_size_desc",
13361
+ "company_size_asc"
13362
+ ]
13363
+ },
13152
13364
  "firstName": {
13153
13365
  "description": "First name tokens, using accent-folded fuzzy matching. Requires companyId.",
13154
13366
  "type": "string",
@@ -13588,23 +13800,35 @@ var TOOL_CATALOG = [
13588
13800
 
13589
13801
  // src/transport.ts
13590
13802
  import { z } from "zod";
13591
- var failure = z.object({ error: z.union([z.string(), z.object({ code: z.string().max(128), message: z.string().max(2048).optional(), retry_after: z.number().nonnegative().finite().optional() })]) });
13803
+ var failure = z.object({ error: z.union([z.string(), z.object({ code: z.string().max(128), message: z.string().max(2048).optional(), billing_href: z.string().max(2048).optional(), retry_after: z.number().nonnegative().finite().optional() })]) });
13592
13804
  var HigherDataError = class extends Error {
13593
- constructor(message, code, status = 0, retryAfter2, requestId) {
13805
+ constructor(message, code, status = 0, retryAfter2, requestId, billingHref) {
13594
13806
  super(message);
13595
13807
  this.code = code;
13596
13808
  this.status = status;
13597
13809
  this.retryAfter = retryAfter2;
13598
13810
  this.requestId = requestId;
13811
+ this.billingHref = billingHref;
13599
13812
  this.name = "HigherDataError";
13600
13813
  }
13601
13814
  code;
13602
13815
  status;
13603
13816
  retryAfter;
13604
13817
  requestId;
13818
+ billingHref;
13605
13819
  };
13606
13820
  var limits = z.object({ maxRetries: z.number().int().min(0).max(5), timeoutMs: z.number().int().min(1).max(3e5), maxRetryDelayMs: z.number().int().min(0).max(3e5) });
13607
13821
  var MAX_RESPONSE = 8 * 1024 * 1024;
13822
+ var DOWNLOAD_PAGE_ROWS = 500;
13823
+ var INTERACTIVE_PAGE_ROWS = 50;
13824
+ function responseByteLimit(path, input) {
13825
+ const name = path.split("?")[0]?.split("/").at(-1);
13826
+ if (name !== "search.companies" && name !== "search.people") return MAX_RESPONSE;
13827
+ if (!input || typeof input !== "object" || Array.isArray(input) || input.download !== true) return MAX_RESPONSE;
13828
+ const limit = input.limit;
13829
+ const rows = typeof limit === "number" && Number.isInteger(limit) && limit >= 1 ? Math.min(limit, DOWNLOAD_PAGE_ROWS) : INTERACTIVE_PAGE_ROWS;
13830
+ return MAX_RESPONSE * Math.ceil(rows / INTERACTIVE_PAGE_ROWS);
13831
+ }
13608
13832
  function retryAfter(response, data, now) {
13609
13833
  const value = response.headers.get("retry-after");
13610
13834
  if (value !== null) {
@@ -13621,9 +13845,9 @@ function retryAfter(response, data, now) {
13621
13845
  }
13622
13846
  function apiError(response, data, now) {
13623
13847
  const parsed = failure.safeParse(data), error = parsed.success ? parsed.data.error : null;
13624
- return new HigherDataError(typeof error === "object" && error?.message ? error.message : "The HigherData API request failed.", typeof error === "string" ? error : error?.code ?? "http_error", response.status, retryAfter(response, data, now), response.headers.get("x-request-id") ?? void 0);
13848
+ return new HigherDataError(typeof error === "object" && error?.message ? error.message : "The HigherData API request failed.", typeof error === "string" ? error : error?.code ?? "http_error", response.status, retryAfter(response, data, now), response.headers.get("x-request-id") ?? void 0, typeof error === "object" ? error?.billing_href : void 0);
13625
13849
  }
13626
- async function responseJson(response) {
13850
+ async function responseJson(response, maxBytes) {
13627
13851
  if (!response.body) throw new HigherDataError("The API returned an invalid response.", "invalid_response");
13628
13852
  const reader = response.body.getReader(), chunks = [];
13629
13853
  let length = 0;
@@ -13632,7 +13856,7 @@ async function responseJson(response) {
13632
13856
  const { done, value } = await reader.read();
13633
13857
  if (done) break;
13634
13858
  length += value.byteLength;
13635
- if (length > MAX_RESPONSE) {
13859
+ if (length > maxBytes) {
13636
13860
  await reader.cancel();
13637
13861
  throw new HigherDataError("The API response exceeded the size limit.", "response_too_large");
13638
13862
  }
@@ -13706,7 +13930,7 @@ var JsonTransport = class {
13706
13930
  const timeout = AbortSignal.timeout(options.timeoutMs ?? this.settings.timeoutMs);
13707
13931
  response = await (this.options.fetch ?? fetch)(url.toString(), { method: "POST", headers, body, redirect: "manual", signal: options.signal ? AbortSignal.any([timeout, options.signal]) : timeout });
13708
13932
  try {
13709
- data = await responseJson(response);
13933
+ data = await responseJson(response, responseByteLimit(path, input));
13710
13934
  } catch (error2) {
13711
13935
  if (response.ok) throw error2;
13712
13936
  data = void 0;