@graph8/sdk 0.238.0 → 0.245.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 +15 -0
- package/dist/index.d.mts +144 -28
- package/dist/index.d.ts +144 -28
- package/dist/index.js +893 -22
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +893 -22
- package/dist/index.mjs.map +1 -1
- package/dist/react.d.mts +132 -21
- package/dist/react.d.ts +132 -21
- package/dist/react.js +892 -21
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +892 -21
- package/dist/react.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -332,6 +332,662 @@ var createCalendarClient = (apiUrl) => {
|
|
|
332
332
|
};
|
|
333
333
|
};
|
|
334
334
|
|
|
335
|
+
// src/generated/billable.ts
|
|
336
|
+
var BILLABLE_ROUTES = {
|
|
337
|
+
GET: [
|
|
338
|
+
"/apps/{app_id}/runtime",
|
|
339
|
+
"/audience-syncs/{config_id}/runs",
|
|
340
|
+
"/campaigns/{campaign_id}/dashboard",
|
|
341
|
+
"/companies/{company_id}/next-best-step",
|
|
342
|
+
"/contacts/{contact_id}/next-best-step",
|
|
343
|
+
"/desk/kickoff",
|
|
344
|
+
"/desk/kickoff/audio",
|
|
345
|
+
"/radar/competitors/{competitor_id}/discover-pages",
|
|
346
|
+
"/repos/{repo_id}/scan",
|
|
347
|
+
"/seo/domains/{domain}/backlinks",
|
|
348
|
+
"/seo/domains/{domain}/overview",
|
|
349
|
+
"/voice/campaigns/call-scripts",
|
|
350
|
+
"/voice/campaigns/email-templates",
|
|
351
|
+
"/voice/campaigns/templates",
|
|
352
|
+
"/voice/research/business-data",
|
|
353
|
+
"/voice/research/competitors",
|
|
354
|
+
"/voice/research/faq",
|
|
355
|
+
"/voice/research/keywords",
|
|
356
|
+
"/voice/research/prospect-company",
|
|
357
|
+
"/work/routines/{routine_id}/runs"
|
|
358
|
+
],
|
|
359
|
+
PATCH: [
|
|
360
|
+
"/enrichment/auto-enrichment/configs/{config_id}",
|
|
361
|
+
"/intent/keywords/{keyword_id}",
|
|
362
|
+
"/intent/keywords/{keyword_id}/sync-config",
|
|
363
|
+
"/marketplace/agencies/{slug}",
|
|
364
|
+
"/marketplace/agencies/{slug}/reps/{sdr_id}",
|
|
365
|
+
"/marketplace/agencies/{slug}/service-statements/{statement_id}",
|
|
366
|
+
"/marketplace/applications/{application_id}",
|
|
367
|
+
"/marketplace/conversations/{conversation_id}/state",
|
|
368
|
+
"/marketplace/job-posts/{post_id}",
|
|
369
|
+
"/marketplace/me/meetings/{meeting_id}",
|
|
370
|
+
"/marketplace/me/messages/{conversation_id}/state",
|
|
371
|
+
"/marketplace/me/profile",
|
|
372
|
+
"/marketplace/me/service-statements/{statement_id}",
|
|
373
|
+
"/marketplace/org/meetings/{meeting_id}",
|
|
374
|
+
"/radar/competitors/{competitor_id}",
|
|
375
|
+
"/radar/gaps/{gap_id}",
|
|
376
|
+
"/research-reports/{report_id}",
|
|
377
|
+
"/social-listeners/settings",
|
|
378
|
+
"/social-listeners/{listener_id}"
|
|
379
|
+
],
|
|
380
|
+
POST: [
|
|
381
|
+
"/accounts/{account_id}/generate-outreach-plan",
|
|
382
|
+
"/accounts/{account_id}/security-questionnaires",
|
|
383
|
+
"/accounts/{account_id}/stakeholders/{stakeholder_id}/generate-outreach",
|
|
384
|
+
"/ad-creatives",
|
|
385
|
+
"/ad-creatives/batch",
|
|
386
|
+
"/ad-creatives/concepts",
|
|
387
|
+
"/ad-creatives/video/clips",
|
|
388
|
+
"/ad-creatives/video/clips/prompt-enhance",
|
|
389
|
+
"/ad-creatives/video/clips/{clip_id}/continue",
|
|
390
|
+
"/ad-creatives/video/clips/{clip_id}/extend",
|
|
391
|
+
"/ad-creatives/video/clips/{clip_id}/regenerate",
|
|
392
|
+
"/ad-creatives/{creative_id}/ai-review",
|
|
393
|
+
"/ad-creatives/{creative_id}/chat-edit",
|
|
394
|
+
"/ad-creatives/{creative_id}/image-edit-at-point",
|
|
395
|
+
"/ad-creatives/{creative_id}/persona-lens",
|
|
396
|
+
"/ad-creatives/{creative_id}/regenerate-copy",
|
|
397
|
+
"/ad-creatives/{creative_id}/regenerate-image",
|
|
398
|
+
"/ad-creatives/{creative_id}/retry",
|
|
399
|
+
"/ad-creatives/{creative_id}/rewrite-field",
|
|
400
|
+
"/ad-creatives/{creative_id}/size-set",
|
|
401
|
+
"/agent/chat",
|
|
402
|
+
"/agent/onboarding/discovery/turn",
|
|
403
|
+
"/agent/operators/{operator}/approvals/{task_id}/decide",
|
|
404
|
+
"/agent/sessions/{session_id}/voice",
|
|
405
|
+
"/agent/work-items",
|
|
406
|
+
"/app-pages/{page_id}/generate",
|
|
407
|
+
"/campaigns/generate-ideas",
|
|
408
|
+
"/campaigns/generate-ideas-async",
|
|
409
|
+
"/campaigns/recommend-personas",
|
|
410
|
+
"/campaigns/{campaign_id}/audience-pipeline/accept-filters",
|
|
411
|
+
"/campaigns/{campaign_id}/audience-pipeline/trigger",
|
|
412
|
+
"/campaigns/{campaign_id}/documents/{document_id}/regenerate",
|
|
413
|
+
"/campaigns/{campaign_id}/sequence/steps/{step_id}/generate",
|
|
414
|
+
"/companies/enrich/bulk",
|
|
415
|
+
"/companies/enrich/people/bulk",
|
|
416
|
+
"/companies/enrich/stakeholders/bulk",
|
|
417
|
+
"/companies/import",
|
|
418
|
+
"/companies/{company_id}/documents/types/{doc_type}/generate",
|
|
419
|
+
"/companies/{company_id}/documents/types/{doc_type}/regenerate",
|
|
420
|
+
"/companies/{company_id}/enrich",
|
|
421
|
+
"/companies/{company_id}/retry-intelligence",
|
|
422
|
+
"/companies/{company_id}/retry-synthesis",
|
|
423
|
+
"/companies/{company_id}/workflows/{workflow_type}/start",
|
|
424
|
+
"/company-profile/generate",
|
|
425
|
+
"/company-profile/reindex",
|
|
426
|
+
"/company-profile/retry",
|
|
427
|
+
"/contacts/unlock-info",
|
|
428
|
+
"/contacts/verify-email",
|
|
429
|
+
"/contacts/verify-email/async",
|
|
430
|
+
"/contacts/workflow-executions/run",
|
|
431
|
+
"/contacts/{contact_id}/documents/generate-all",
|
|
432
|
+
"/contacts/{contact_id}/documents/types/{doc_type}/generate",
|
|
433
|
+
"/contacts/{contact_id}/documents/types/{doc_type}/regenerate",
|
|
434
|
+
"/content-workspace/import/crawl",
|
|
435
|
+
"/content/calendar/ideas/{idea_id}/create-content",
|
|
436
|
+
"/content/calendar/mine-signals",
|
|
437
|
+
"/content/calendar/repurpose/ad",
|
|
438
|
+
"/content/calendar/repurpose/linkedin-post",
|
|
439
|
+
"/content/grids/{grid_id}/columns/{column_id}/run",
|
|
440
|
+
"/content/grids/{grid_id}/rows/{row_id}/run/{column_id}",
|
|
441
|
+
"/content/pages/enrich-seo-bulk",
|
|
442
|
+
"/content/pages/{page_id}/enrich-seo",
|
|
443
|
+
"/copilot/chat",
|
|
444
|
+
"/copilot/landing-page-action",
|
|
445
|
+
"/copilot/memory/promote",
|
|
446
|
+
"/customer-success/companies/{company_id}/brief/synthesize",
|
|
447
|
+
"/deals/{deal_id}/documents/generate-all",
|
|
448
|
+
"/deals/{deal_id}/documents/types/{doc_type}/generate",
|
|
449
|
+
"/deals/{deal_id}/documents/types/{doc_type}/regenerate",
|
|
450
|
+
"/deals/{deal_id}/next-best-step",
|
|
451
|
+
"/desk/accounts/{account_id}/committee/{contact_id}/find-linkedin",
|
|
452
|
+
"/desk/accounts/{account_id}/plan/draft",
|
|
453
|
+
"/desk/ask",
|
|
454
|
+
"/desk/decisions/{decision_id}/replan",
|
|
455
|
+
"/desk/email-improve",
|
|
456
|
+
"/desk/email-score",
|
|
457
|
+
"/desk/org-settings/plan-stages/run",
|
|
458
|
+
"/desk/voice-memo",
|
|
459
|
+
"/dialer/parallel-calls/grading/backfill",
|
|
460
|
+
"/dialer/sessions/prewarm-voicemails",
|
|
461
|
+
"/enrichment/ai-formula/generate",
|
|
462
|
+
"/enrichment/ai-formula/generate-condition",
|
|
463
|
+
"/enrichment/ai/batch/enrich",
|
|
464
|
+
"/enrichment/ai/enrich",
|
|
465
|
+
"/enrichment/ai/qualification/generate-templates",
|
|
466
|
+
"/enrichment/ai/qualification/run",
|
|
467
|
+
"/enrichment/auto-enrichment/configs",
|
|
468
|
+
"/enrichment/enrich",
|
|
469
|
+
"/enrichment/find-people/configure",
|
|
470
|
+
"/enrichment/find-people/search-import",
|
|
471
|
+
"/enrichment/find-people/{config_id}/import",
|
|
472
|
+
"/enrichment/find-people/{config_id}/preview",
|
|
473
|
+
"/enrichment/find-people/{config_id}/run",
|
|
474
|
+
"/enrichment/generate-prompt",
|
|
475
|
+
"/enrichment/jobs/{job_id}/resume",
|
|
476
|
+
"/enrichment/list-routing/generate-filter",
|
|
477
|
+
"/enrichment/lists/{list_id}/pipelines",
|
|
478
|
+
"/enrichment/lists/{list_id}/pipelines/ai-draft",
|
|
479
|
+
"/enrichment/lists/{list_id}/pipelines/{pipeline_id}/enabled",
|
|
480
|
+
"/enrichment/lists/{list_id}/pipelines/{pipeline_id}/runs",
|
|
481
|
+
"/enrichment/lookup/company",
|
|
482
|
+
"/enrichment/lookup/person",
|
|
483
|
+
"/enrichment/record-sync/{entity_type}/run",
|
|
484
|
+
"/enrichment/verify-email",
|
|
485
|
+
"/enrichment/waterfall/configs",
|
|
486
|
+
"/enrichment/waterfall/enrich",
|
|
487
|
+
"/global-context/generate-all",
|
|
488
|
+
"/global-context/generate/{doc_type}",
|
|
489
|
+
"/hiring-signals/aggregators",
|
|
490
|
+
"/hiring-signals/companies",
|
|
491
|
+
"/hiring-signals/companies/job-counts",
|
|
492
|
+
"/hiring-signals/companies/resolve-ids",
|
|
493
|
+
"/hiring-signals/decision-makers",
|
|
494
|
+
"/hiring-signals/job-changes/match",
|
|
495
|
+
"/hiring-signals/jobs",
|
|
496
|
+
"/hiring-signals/recruiters",
|
|
497
|
+
"/icps/generate",
|
|
498
|
+
"/inbox/drafts/generate",
|
|
499
|
+
"/intelligence/analyze",
|
|
500
|
+
"/intelligence/retry",
|
|
501
|
+
"/intent/contacts/metadata",
|
|
502
|
+
"/intent/keywords/add",
|
|
503
|
+
"/intent/keywords/auto-seed-proposals",
|
|
504
|
+
"/intent/keywords/create-from-domain",
|
|
505
|
+
"/intent/keywords/create-from-search",
|
|
506
|
+
"/intent/keywords/list",
|
|
507
|
+
"/intent/keywords/{keyword_id}/companies",
|
|
508
|
+
"/intent/keywords/{keyword_id}/contacts",
|
|
509
|
+
"/intent/keywords/{keyword_id}/filters",
|
|
510
|
+
"/intent/keywords/{keyword_id}/job-resolution",
|
|
511
|
+
"/intent/keywords/{keyword_id}/sync",
|
|
512
|
+
"/intent/keywords/{keyword_id}/urls",
|
|
513
|
+
"/intent/pages-by-domain",
|
|
514
|
+
"/intent/pages/contacts",
|
|
515
|
+
"/intent/pages/search",
|
|
516
|
+
"/intent/pages/visitor-counts",
|
|
517
|
+
"/intent/pages/visitors",
|
|
518
|
+
"/landing-pages",
|
|
519
|
+
"/landing-pages/clone-homepage",
|
|
520
|
+
"/landing-pages/clone-html",
|
|
521
|
+
"/landing-pages/clone-url",
|
|
522
|
+
"/landing-pages/components/extract",
|
|
523
|
+
"/landing-pages/ensure-base-template",
|
|
524
|
+
"/landing-pages/{landing_page_id}/ai-review",
|
|
525
|
+
"/landing-pages/{landing_page_id}/ai-review/fix-with-ai",
|
|
526
|
+
"/landing-pages/{landing_page_id}/edit",
|
|
527
|
+
"/landing-pages/{landing_page_id}/edit-element",
|
|
528
|
+
"/landing-pages/{landing_page_id}/edit-page",
|
|
529
|
+
"/landing-pages/{landing_page_id}/generate-seo-metadata",
|
|
530
|
+
"/landing-pages/{landing_page_id}/rewrite-text",
|
|
531
|
+
"/leads/generate-content/batches",
|
|
532
|
+
"/leads/{lead_id}/generate-content",
|
|
533
|
+
"/library/case-studies/backfill",
|
|
534
|
+
"/lifecycle-contacts/unlock",
|
|
535
|
+
"/mailboxes/schedule-buy/plans",
|
|
536
|
+
"/mailboxes/schedule-buy/plans/{plan_id}/resume",
|
|
537
|
+
"/mailboxes/uncancel",
|
|
538
|
+
"/mailboxes/{mailbox_id}/health/placement-test",
|
|
539
|
+
"/marketplace/agencies/{slug}/intake/upload",
|
|
540
|
+
"/marketplace/agencies/{slug}/reps/{sdr_id}/unlist",
|
|
541
|
+
"/marketplace/agencies/{slug}/reps/{sdr_id}/video-intro",
|
|
542
|
+
"/marketplace/agencies/{slug}/service-statements",
|
|
543
|
+
"/marketplace/agencies/{slug}/service-statements/{statement_id}/line-items",
|
|
544
|
+
"/marketplace/agencies/{slug}/service-statements/{statement_id}/submit",
|
|
545
|
+
"/marketplace/commissions/entries",
|
|
546
|
+
"/marketplace/commissions/entries/{entry_id}/quality",
|
|
547
|
+
"/marketplace/commissions/entries/{entry_id}/reversals",
|
|
548
|
+
"/marketplace/commissions/entries/{entry_id}/statement",
|
|
549
|
+
"/marketplace/commissions/plans",
|
|
550
|
+
"/marketplace/commissions/plans/{version_id}/activate",
|
|
551
|
+
"/marketplace/commissions/preview",
|
|
552
|
+
"/marketplace/conversations/{conversation_id}/read",
|
|
553
|
+
"/marketplace/job-posts",
|
|
554
|
+
"/marketplace/job-posts/{post_id}/jd",
|
|
555
|
+
"/marketplace/me/headshot",
|
|
556
|
+
"/marketplace/me/invoices",
|
|
557
|
+
"/marketplace/me/invoices/{invoice_id}/approve",
|
|
558
|
+
"/marketplace/me/messages/{conversation_id}/read",
|
|
559
|
+
"/marketplace/me/offers/{hiring_id}/accept",
|
|
560
|
+
"/marketplace/me/offers/{hiring_id}/reject",
|
|
561
|
+
"/marketplace/me/payout-account/w8-certify",
|
|
562
|
+
"/marketplace/me/resume",
|
|
563
|
+
"/marketplace/me/service-statements",
|
|
564
|
+
"/marketplace/me/service-statements/{statement_id}/line-items",
|
|
565
|
+
"/marketplace/me/service-statements/{statement_id}/revise",
|
|
566
|
+
"/marketplace/me/service-statements/{statement_id}/submit",
|
|
567
|
+
"/marketplace/me/video-intro",
|
|
568
|
+
"/marketplace/me/work-certificates",
|
|
569
|
+
"/marketplace/opportunities/{post_id}/apply",
|
|
570
|
+
"/marketplace/org/hirings/{hiring_id}/meetings",
|
|
571
|
+
"/marketplace/org/hirings/{hiring_id}/terminate",
|
|
572
|
+
"/marketplace/org/hirings/{hiring_id}/withdraw",
|
|
573
|
+
"/marketplace/org/invoices/{invoice_id}/approve",
|
|
574
|
+
"/marketplace/org/invoices/{invoice_id}/dispute",
|
|
575
|
+
"/marketplace/org/service-statements/{statement_id}/approve",
|
|
576
|
+
"/marketplace/org/service-statements/{statement_id}/line-items",
|
|
577
|
+
"/marketplace/org/service-statements/{statement_id}/reject",
|
|
578
|
+
"/marketplace/org/service-statements/{statement_id}/request-changes",
|
|
579
|
+
"/marketplace/shortlist/export",
|
|
580
|
+
"/marketplace/talent/{sdr_id}/hire",
|
|
581
|
+
"/marketplace/talent/{sdr_id}/match/analyze",
|
|
582
|
+
"/marketplace/talent/{sdr_id}/match/refresh",
|
|
583
|
+
"/marketplace/terms-acknowledgements/ack-all",
|
|
584
|
+
"/meeting-transcripts/{transcript_id}/follow-up-draft",
|
|
585
|
+
"/meeting-transcripts/{transcript_id}/review/regenerate",
|
|
586
|
+
"/newsletters/templates/clone",
|
|
587
|
+
"/newsletters/templates/custom",
|
|
588
|
+
"/newsletters/templates/layout",
|
|
589
|
+
"/newsletters/{newsletter_id}/issues/{issue_id}/generate",
|
|
590
|
+
"/newsletters/{newsletter_id}/issues/{issue_id}/rewrite-text",
|
|
591
|
+
"/newsletters/{newsletter_id}/subscribers/import-audience",
|
|
592
|
+
"/newsletters/{newsletter_id}/subscribers/verify",
|
|
593
|
+
"/org-videos/generate",
|
|
594
|
+
"/org/brand-snapshot/refresh",
|
|
595
|
+
"/personas/generate",
|
|
596
|
+
"/phone-numbers/purchase",
|
|
597
|
+
"/pipelines/suggest",
|
|
598
|
+
"/placement/tests",
|
|
599
|
+
"/provider-domains/add-external",
|
|
600
|
+
"/provider-domains/check-availability",
|
|
601
|
+
"/provider-domains/checkout-purchase",
|
|
602
|
+
"/provider-domains/checkout-transfer",
|
|
603
|
+
"/provider-domains/{domain_id}/auto-warmup",
|
|
604
|
+
"/provider-domains/{domain_id}/check-propagation",
|
|
605
|
+
"/provider-domains/{domain_id}/checkout-mailboxes",
|
|
606
|
+
"/provider-domains/{domain_id}/connect-provider",
|
|
607
|
+
"/provider-domains/{domain_id}/dns",
|
|
608
|
+
"/public/enrich/lookup",
|
|
609
|
+
"/radar/aeo/run",
|
|
610
|
+
"/radar/competitors",
|
|
611
|
+
"/radar/competitors/bulk",
|
|
612
|
+
"/radar/competitors/{competitor_id}/scan",
|
|
613
|
+
"/radar/gaps/analyze",
|
|
614
|
+
"/radar/initiatives/measure",
|
|
615
|
+
"/radar/opportunities/approve-all",
|
|
616
|
+
"/radar/opportunities/{gap_id}/approve",
|
|
617
|
+
"/radar/reports",
|
|
618
|
+
"/radar/scan-all",
|
|
619
|
+
"/repos/{repo_id}/scan",
|
|
620
|
+
"/research-reports/generate",
|
|
621
|
+
"/research-reports/generate-all",
|
|
622
|
+
"/research-reports/retry",
|
|
623
|
+
"/research-reports/workflow/resume",
|
|
624
|
+
"/revenue/stage-docs/{lifecycle_entry_id}/{entity}/backfill",
|
|
625
|
+
"/scrape/requests",
|
|
626
|
+
"/search/companies",
|
|
627
|
+
"/search/companies/save",
|
|
628
|
+
"/search/contacts",
|
|
629
|
+
"/search/contacts/save",
|
|
630
|
+
"/seo/audits",
|
|
631
|
+
"/seo/keywords/research",
|
|
632
|
+
"/sequencer/content/email/generate",
|
|
633
|
+
"/sequencer/content/instructions/improve",
|
|
634
|
+
"/sequencer/content/linkedin/generate",
|
|
635
|
+
"/sequencer/templates/steps/generate",
|
|
636
|
+
"/social-listeners",
|
|
637
|
+
"/social-listeners/auto-seed/all",
|
|
638
|
+
"/social-listeners/auto-seed/brand",
|
|
639
|
+
"/social-listeners/auto-seed/competitors",
|
|
640
|
+
"/social-listeners/auto-seed/engagement",
|
|
641
|
+
"/social-listeners/auto-seed/keywords",
|
|
642
|
+
"/social-listeners/bulk-from-list",
|
|
643
|
+
"/social-listeners/integrations/x",
|
|
644
|
+
"/social-listeners/integrations/x/test",
|
|
645
|
+
"/social-listeners/posts/{post_id}/engagements/add-to-list",
|
|
646
|
+
"/social-listeners/posts/{post_id}/mark",
|
|
647
|
+
"/social-listeners/posts/{post_id}/save-contact",
|
|
648
|
+
"/social-listeners/queries/generate",
|
|
649
|
+
"/social/posts/generate",
|
|
650
|
+
"/tam/generate",
|
|
651
|
+
"/tam/regenerate",
|
|
652
|
+
"/tasks/{task_id}/start",
|
|
653
|
+
"/team-members/me/enrich-linkedin",
|
|
654
|
+
"/team-members/{team_member_id}/enrich-linkedin",
|
|
655
|
+
"/team-members/{team_member_id}/generate-post",
|
|
656
|
+
"/teams/auto-compose/suggest",
|
|
657
|
+
"/voice/agents/{agent_id}/documents/upload",
|
|
658
|
+
"/voice/call-flow-examples/transcribe",
|
|
659
|
+
"/voice/call-scripts/generate",
|
|
660
|
+
"/voice/campaigns/call-scripts",
|
|
661
|
+
"/voice/campaigns/email-enhancements",
|
|
662
|
+
"/voice/campaigns/email-spintax",
|
|
663
|
+
"/voice/campaigns/emails",
|
|
664
|
+
"/voice/campaigns/linkedin-messages",
|
|
665
|
+
"/voice/campaigns/onboarding/messages",
|
|
666
|
+
"/voice/campaigns/onboarding/threads/actions",
|
|
667
|
+
"/voice/campaigns/voicemails",
|
|
668
|
+
"/voice/chat-agent/messages",
|
|
669
|
+
"/voice/collections/{collection_id}/files/paste-text",
|
|
670
|
+
"/voice/collections/{collection_id}/files/upload",
|
|
671
|
+
"/voice/collections/{collection_id}/files/upload-multiple",
|
|
672
|
+
"/voice/collections/{collection_id}/reindex",
|
|
673
|
+
"/voice/collections/{collection_id}/scrape-sources",
|
|
674
|
+
"/voice/collections/{collection_id}/scrape-sources/{source_id}/run",
|
|
675
|
+
"/voice/email-agent/batch",
|
|
676
|
+
"/voice/email-agent/compose",
|
|
677
|
+
"/voice/email-agent/draft-reply",
|
|
678
|
+
"/voice/icp/queries",
|
|
679
|
+
"/voice/knowledge-base/files/upload",
|
|
680
|
+
"/voice/receptionist/messages",
|
|
681
|
+
"/voice/research/company",
|
|
682
|
+
"/voice/research/org-chart",
|
|
683
|
+
"/voice/research/prospect-data",
|
|
684
|
+
"/voice/research/prospect-profile",
|
|
685
|
+
"/voice/topics/classify",
|
|
686
|
+
"/voice/twins",
|
|
687
|
+
"/voice/twins/extract-linkedin",
|
|
688
|
+
"/voice/video-recordings/upload",
|
|
689
|
+
"/voice/voice-library/onboarding-voice",
|
|
690
|
+
"/voice/voice-library/voices",
|
|
691
|
+
"/voice/worksheets/calculate",
|
|
692
|
+
"/work/signals/promote",
|
|
693
|
+
"/workbench/tables/{table_id}/ai/generate-prompt",
|
|
694
|
+
"/workbench/tables/{table_id}/ai/groups/{group_id}/run",
|
|
695
|
+
"/workbench/tables/{table_id}/ai/preview",
|
|
696
|
+
"/workbench/tables/{table_id}/ai/run",
|
|
697
|
+
"/workbench/tables/{table_id}/ai/run-all",
|
|
698
|
+
"/workbench/tables/{table_id}/columns/{col_id}/ai/run",
|
|
699
|
+
"/workbench/tables/{table_id}/find-people/configure",
|
|
700
|
+
"/workbench/tables/{table_id}/find-people/{config_id}/run",
|
|
701
|
+
"/workbench/tables/{table_id}/import/search",
|
|
702
|
+
"/workbench/tables/{table_id}/import/search/research/preview",
|
|
703
|
+
"/workbench/tables/{table_id}/pipelines",
|
|
704
|
+
"/workbench/tables/{table_id}/scraper/providers/{provider}/runs",
|
|
705
|
+
"/workbench/tables/{table_id}/scraper/runs",
|
|
706
|
+
"/workbench/tables/{table_id}/suggest-mappings",
|
|
707
|
+
"/workbench/tables/{table_id}/triggers",
|
|
708
|
+
"/workbench/tables/{table_id}/unlock-rows",
|
|
709
|
+
"/workbench/tables/{table_id}/waterfall/configs/{column_id}/run"
|
|
710
|
+
],
|
|
711
|
+
PUT: [
|
|
712
|
+
"/agent/operators/{operator}/enabled",
|
|
713
|
+
"/agent/operators/{operator}/skills/{skill_key}",
|
|
714
|
+
"/deliverability/autopilot/preferences",
|
|
715
|
+
"/enrichment/auto-enrichment/settings/{entity_type}",
|
|
716
|
+
"/enrichment/lists/{list_id}/pipelines/{pipeline_id}",
|
|
717
|
+
"/enrichment/record-sync/{entity_type}/policy",
|
|
718
|
+
"/enrichment/waterfall/configs/{column_id}",
|
|
719
|
+
"/marketplace/me/invoices/{invoice_id}",
|
|
720
|
+
"/marketplace/me/rates",
|
|
721
|
+
"/radar/settings",
|
|
722
|
+
"/workbench/tables/{table_id}/auto-enrich",
|
|
723
|
+
"/workbench/tables/{table_id}/pipelines/{pipeline_id}",
|
|
724
|
+
"/workbench/tables/{table_id}/schedule",
|
|
725
|
+
"/workbench/tables/{table_id}/triggers/{trigger_id}"
|
|
726
|
+
]
|
|
727
|
+
};
|
|
728
|
+
|
|
729
|
+
// src/generated/external.ts
|
|
730
|
+
var EXTERNAL_ROUTES = {
|
|
731
|
+
GET: [
|
|
732
|
+
"/dialer/sessions/token",
|
|
733
|
+
"/marketplace/me/connect/dashboard-link",
|
|
734
|
+
"/marketplace/me/connect/onboarding-link",
|
|
735
|
+
"/marketplace/me/payout-account/login-link",
|
|
736
|
+
"/marketplace/me/payout-account/onboarding-link",
|
|
737
|
+
"/voice/mcp-servers/{mcp_server_id}/tools"
|
|
738
|
+
],
|
|
739
|
+
PATCH: [
|
|
740
|
+
"/ad-campaigns/{campaign_id}/ads/{ad_id}",
|
|
741
|
+
"/appointments/bookings/{booking_uid}/location",
|
|
742
|
+
"/appointments/bookings/{booking_uid}/sequence",
|
|
743
|
+
"/appointments/workflows/{workflow_id}",
|
|
744
|
+
"/audience-syncs/{config_id}",
|
|
745
|
+
"/campaigns/{campaign_id}",
|
|
746
|
+
"/campaigns/{campaign_id}/full",
|
|
747
|
+
"/content/calendar/{content_type}/{content_id}/schedule",
|
|
748
|
+
"/inbox/mailboxes/bulk",
|
|
749
|
+
"/inbox/mailboxes/{mailbox}/settings",
|
|
750
|
+
"/integrations/crm/meetings/{event_id}",
|
|
751
|
+
"/newsletters/{newsletter_id}/subscribers/{subscriber_id}/unsubscribe",
|
|
752
|
+
"/quotes/{quote_id}",
|
|
753
|
+
"/sequences/{sequence_id}",
|
|
754
|
+
"/sequences/{sequence_id}/steps/{step_id}",
|
|
755
|
+
"/voice/dialer/sessions/{session_id}/status",
|
|
756
|
+
"/voice/dispositions/{disposition_id}",
|
|
757
|
+
"/webhooks/{webhook_id}"
|
|
758
|
+
],
|
|
759
|
+
POST: [
|
|
760
|
+
"/ad-campaigns/images",
|
|
761
|
+
"/ad-campaigns/status-refresh",
|
|
762
|
+
"/ad-campaigns/{campaign_id}/ads",
|
|
763
|
+
"/ad-campaigns/{campaign_id}/ads/batch",
|
|
764
|
+
"/ad-campaigns/{campaign_id}/ads/{ad_id}/status",
|
|
765
|
+
"/ad-campaigns/{campaign_id}/edit-preview",
|
|
766
|
+
"/ad-campaigns/{campaign_id}/retry",
|
|
767
|
+
"/ad-campaigns/{campaign_id}/status-refresh",
|
|
768
|
+
"/appointments/bookings",
|
|
769
|
+
"/appointments/bookings/import",
|
|
770
|
+
"/appointments/bookings/{booking_uid}/confirm",
|
|
771
|
+
"/appointments/bookings/{booking_uid}/guests",
|
|
772
|
+
"/appointments/bookings/{booking_uid}/mark-absent",
|
|
773
|
+
"/appointments/bookings/{booking_uid}/notes",
|
|
774
|
+
"/appointments/bookings/{booking_uid}/request-reschedule",
|
|
775
|
+
"/appointments/bookings/{booking_uid}/reschedule",
|
|
776
|
+
"/appointments/calendars/selected",
|
|
777
|
+
"/appointments/conferencing/connect/{provider}",
|
|
778
|
+
"/appointments/conferencing/{provider}/default",
|
|
779
|
+
"/appointments/workflows",
|
|
780
|
+
"/appointments/workflows/{workflow_id}/toggle",
|
|
781
|
+
"/audience-syncs",
|
|
782
|
+
"/audience-syncs/google/conversion-actions",
|
|
783
|
+
"/audience-syncs/google/conversions",
|
|
784
|
+
"/audience-syncs/google/video-assets/library",
|
|
785
|
+
"/audience-syncs/google/video-assets/links",
|
|
786
|
+
"/audience-syncs/google/video-assets/upload-urls",
|
|
787
|
+
"/audience-syncs/google/video-assets/uploads",
|
|
788
|
+
"/audience-syncs/{config_id}/launch",
|
|
789
|
+
"/audience-syncs/{config_id}/trigger",
|
|
790
|
+
"/campaigns",
|
|
791
|
+
"/campaigns/{campaign_id}/ad-images/{image_id}/hide",
|
|
792
|
+
"/campaigns/{campaign_id}/documents",
|
|
793
|
+
"/campaigns/{campaign_id}/launch",
|
|
794
|
+
"/campaigns/{campaign_id}/sequence/steps",
|
|
795
|
+
"/content/calendar/{content_type}/{content_id}/retry-publish",
|
|
796
|
+
"/crm-syncs/{provider}/companies/push",
|
|
797
|
+
"/crm-syncs/{provider}/contacts/push",
|
|
798
|
+
"/crm-syncs/{provider}/lists/push",
|
|
799
|
+
"/customer-success/companies/{company_id}/sync",
|
|
800
|
+
"/desk/accounts/{account_id}/committee/plays/{action_id}/run",
|
|
801
|
+
"/desk/accounts/{account_id}/committee/{contact_id}/linkedin-invite",
|
|
802
|
+
"/desk/decisions/{decision_id}/plays/{action_id}/run",
|
|
803
|
+
"/desk/decisions/{decision_id}/send-reply",
|
|
804
|
+
"/desk/decisions/{decision_id}/send-sms",
|
|
805
|
+
"/desk/plays/approvals/{execution_id}/decide",
|
|
806
|
+
"/dialer/parallel-calls/calls/{livekit_room_name}/drop-voicemail",
|
|
807
|
+
"/dialer/parallel-calls/manual-dial",
|
|
808
|
+
"/dialer/parallel-calls/redial-contact",
|
|
809
|
+
"/dialer/parallel-calls/sessions/start",
|
|
810
|
+
"/dialer/sessions/calls/drop-voicemail",
|
|
811
|
+
"/dialer/sessions/{session_id}/next-batch",
|
|
812
|
+
"/envelopes/{envelope_id}/resend",
|
|
813
|
+
"/envelopes/{envelope_id}/send",
|
|
814
|
+
"/feedback/sending-domains/verify",
|
|
815
|
+
"/feedback/surveys/{survey_id}/send",
|
|
816
|
+
"/forms/deliveries/{receipt_id}/retry",
|
|
817
|
+
"/forms/{form_key}/backfills",
|
|
818
|
+
"/forms/{form_key}/delivery/pause",
|
|
819
|
+
"/forms/{form_key}/delivery/resume",
|
|
820
|
+
"/inbox/emails/compose",
|
|
821
|
+
"/inbox/emails/{email_id}/send",
|
|
822
|
+
"/inbox/linkedin/accounts/sync",
|
|
823
|
+
"/inbox/linkedin/accounts/{account_id}/enable",
|
|
824
|
+
"/inbox/linkedin/compose",
|
|
825
|
+
"/inbox/mailboxes/activate",
|
|
826
|
+
"/inbox/mailboxes/{mailbox}/sync",
|
|
827
|
+
"/inbox/sms/compose",
|
|
828
|
+
"/inbox/{reply_id}/assign",
|
|
829
|
+
"/inbox/{reply_id}/send",
|
|
830
|
+
"/inbox/{reply_id}/tag",
|
|
831
|
+
"/integrations/connections",
|
|
832
|
+
"/integrations/connections/session-token",
|
|
833
|
+
"/integrations/crm-sync/audiences",
|
|
834
|
+
"/integrations/crm-sync/contacts/pull",
|
|
835
|
+
"/integrations/crm-sync/contacts/push",
|
|
836
|
+
"/integrations/crm-sync/deals/pull",
|
|
837
|
+
"/integrations/crm-sync/deals/push",
|
|
838
|
+
"/integrations/crm-sync/leads/previews",
|
|
839
|
+
"/integrations/crm-sync/leads/pull",
|
|
840
|
+
"/integrations/crm-sync/leads/push",
|
|
841
|
+
"/integrations/crm-sync/pull",
|
|
842
|
+
"/integrations/crm-sync/push",
|
|
843
|
+
"/integrations/crm/connections/{connection_id}/batch/contacts",
|
|
844
|
+
"/integrations/crm/connections/{connection_id}/companies",
|
|
845
|
+
"/integrations/crm/connections/{connection_id}/contacts",
|
|
846
|
+
"/integrations/crm/connections/{connection_id}/deals",
|
|
847
|
+
"/integrations/crm/connections/{connection_id}/leads",
|
|
848
|
+
"/integrations/crm/lists",
|
|
849
|
+
"/integrations/crm/lists/memberships",
|
|
850
|
+
"/integrations/crm/meetings",
|
|
851
|
+
"/integrations/linkedin-outreach/campaigns/{campaign_id}/pause",
|
|
852
|
+
"/integrations/linkedin-outreach/campaigns/{campaign_id}/resume",
|
|
853
|
+
"/integrations/linkedin-outreach/connection/reconnect",
|
|
854
|
+
"/integrations/linkedin-outreach/lists",
|
|
855
|
+
"/integrations/linkedin-outreach/lists/{list_id}/leads",
|
|
856
|
+
"/integrations/linkedin-outreach/workspaces/sync",
|
|
857
|
+
"/integrations/migrations/delta-sync",
|
|
858
|
+
"/integrations/migrations/discovery",
|
|
859
|
+
"/integrations/migrations/{migration_id}/confirm",
|
|
860
|
+
"/integrations/sugarcrm/connect",
|
|
861
|
+
"/integrations/sugarcrm/reconnect",
|
|
862
|
+
"/landing-pages/{landing_page_id}/publish",
|
|
863
|
+
"/landing-pages/{landing_page_id}/unpublish",
|
|
864
|
+
"/linkedin/accounts/sync",
|
|
865
|
+
"/marketplace/agencies/{slug}/reps/{sdr_id}/publish",
|
|
866
|
+
"/marketplace/me/messages/{conversation_id}/reply",
|
|
867
|
+
"/marketplace/me/payout-account/bank-details",
|
|
868
|
+
"/marketplace/me/payout-account/methods",
|
|
869
|
+
"/marketplace/me/payout-account/setup",
|
|
870
|
+
"/marketplace/me/sync-workbench",
|
|
871
|
+
"/marketplace/talent/{sdr_id}/messages",
|
|
872
|
+
"/marketplace/talent/{sdr_id}/request",
|
|
873
|
+
"/newsletters",
|
|
874
|
+
"/newsletters/{newsletter_id}/activate",
|
|
875
|
+
"/newsletters/{newsletter_id}/issues",
|
|
876
|
+
"/newsletters/{newsletter_id}/issues/{issue_id}/duplicate",
|
|
877
|
+
"/newsletters/{newsletter_id}/issues/{issue_id}/send",
|
|
878
|
+
"/newsletters/{newsletter_id}/issues/{issue_id}/send-test",
|
|
879
|
+
"/newsletters/{newsletter_id}/issues/{issue_id}/send/resume",
|
|
880
|
+
"/newsletters/{newsletter_id}/resume",
|
|
881
|
+
"/newsletters/{newsletter_id}/settings/verify-domain",
|
|
882
|
+
"/newsletters/{newsletter_id}/subscribers",
|
|
883
|
+
"/nurtures/{nurture_id}/launch",
|
|
884
|
+
"/org/sso/sync",
|
|
885
|
+
"/phone-numbers/a2p/register",
|
|
886
|
+
"/profile/deal-automations/sync-now",
|
|
887
|
+
"/programmatic-campaigns/{campaign_id}/pages/actions",
|
|
888
|
+
"/programmatic-campaigns/{campaign_id}/pages/{page_id}/actions",
|
|
889
|
+
"/provider-domains/{domain_id}/forwarding",
|
|
890
|
+
"/provider-domains/{domain_id}/mailbox-profile-picture",
|
|
891
|
+
"/provider-domains/{domain_id}/regenerate-nameservers",
|
|
892
|
+
"/provider-domains/{domain_id}/resend-transfer-password",
|
|
893
|
+
"/provider-domains/{domain_id}/resend-verification",
|
|
894
|
+
"/provider-domains/{domain_id}/set-nameservers",
|
|
895
|
+
"/provider-usage/refresh",
|
|
896
|
+
"/provider-usage/sync",
|
|
897
|
+
"/quote-billing-contact",
|
|
898
|
+
"/quote-contacts",
|
|
899
|
+
"/quote-settings/documents",
|
|
900
|
+
"/quote-templates",
|
|
901
|
+
"/quotes",
|
|
902
|
+
"/quotes/batch",
|
|
903
|
+
"/quotes/{quote_id}/duplicate",
|
|
904
|
+
"/quotes/{quote_id}/edit-as-draft",
|
|
905
|
+
"/quotes/{quote_id}/mark-accepted",
|
|
906
|
+
"/quotes/{quote_id}/send",
|
|
907
|
+
"/quotes/{quote_id}/unarchive",
|
|
908
|
+
"/radar/alerts/dispatch",
|
|
909
|
+
"/repos/{repo_id}/campaigns/{campaign_id}/launch",
|
|
910
|
+
"/sales-coach/interviews/{interview_id}/members",
|
|
911
|
+
"/sales-coach/interviews/{interview_id}/members/{member_id}/send-invite",
|
|
912
|
+
"/sequencer/content/voice/test-call",
|
|
913
|
+
"/sequences",
|
|
914
|
+
"/sequences/generate-spintax",
|
|
915
|
+
"/sequences/{sequence_id}/contacts",
|
|
916
|
+
"/sequences/{sequence_id}/contacts/{contact_id}/resume",
|
|
917
|
+
"/sequences/{sequence_id}/pause",
|
|
918
|
+
"/sequences/{sequence_id}/resume",
|
|
919
|
+
"/sequences/{sequence_id}/run",
|
|
920
|
+
"/sequences/{sequence_id}/sync",
|
|
921
|
+
"/settings/scrape-config/crawl",
|
|
922
|
+
"/skills/{action_id}/execute",
|
|
923
|
+
"/skills/{action_id}/test-runs",
|
|
924
|
+
"/social-listeners/posts/{post_id}/add-to-sequence",
|
|
925
|
+
"/social/posts/{post_id}/engagers/add-to-audience",
|
|
926
|
+
"/social/posts/{post_id}/engagers/enroll",
|
|
927
|
+
"/social/posts/{post_id}/publish",
|
|
928
|
+
"/social/posts/{post_id}/schedule",
|
|
929
|
+
"/stripe/api-key",
|
|
930
|
+
"/stripe/sync",
|
|
931
|
+
"/team-members/sync",
|
|
932
|
+
"/voice/calls",
|
|
933
|
+
"/voice/dialer/sessions",
|
|
934
|
+
"/voice/dialer/sessions/{session_id}/resume",
|
|
935
|
+
"/voice/dispositions",
|
|
936
|
+
"/voice/inbound-calls/decline",
|
|
937
|
+
"/voice/inbound-calls/dialer/{call_id}/decline",
|
|
938
|
+
"/voice/inbound-calls/{room_name}/claim",
|
|
939
|
+
"/voice/mcp-servers/{mcp_server_id}/test",
|
|
940
|
+
"/webhooks",
|
|
941
|
+
"/webhooks/{webhook_id}/rotate-secret",
|
|
942
|
+
"/website-editor/publish",
|
|
943
|
+
"/website-editor/sync",
|
|
944
|
+
"/workbench/scraper/providers/{provider}/connection/test",
|
|
945
|
+
"/workbench/tables/{table_id}/import/crm",
|
|
946
|
+
"/workbench/tables/{table_id}/send-to-sequence",
|
|
947
|
+
"/workflows",
|
|
948
|
+
"/workflows/executions/approve",
|
|
949
|
+
"/workflows/executions/bulk-restart",
|
|
950
|
+
"/workflows/executions/request-changes",
|
|
951
|
+
"/workflows/executions/{execution_id}/pause",
|
|
952
|
+
"/workflows/executions/{execution_id}/restart",
|
|
953
|
+
"/workflows/executions/{execution_id}/resume",
|
|
954
|
+
"/workflows/executions/{execution_id}/stop",
|
|
955
|
+
"/workflows/integrations/{provider_name}/test",
|
|
956
|
+
"/workflows/validate",
|
|
957
|
+
"/workflows/workbenches",
|
|
958
|
+
"/workflows/{action_id}/execute",
|
|
959
|
+
"/workflows/{action_id}/trigger-reset"
|
|
960
|
+
],
|
|
961
|
+
PUT: [
|
|
962
|
+
"/ad-campaigns/{campaign_id}",
|
|
963
|
+
"/appointments/calendars/destination",
|
|
964
|
+
"/appointments/conferencing/{provider}/link",
|
|
965
|
+
"/campaigns/{campaign_id}/audience",
|
|
966
|
+
"/campaigns/{campaign_id}/documents/{document_id}",
|
|
967
|
+
"/campaigns/{campaign_id}/sequence",
|
|
968
|
+
"/campaigns/{campaign_id}/sequence/steps/{step_id}",
|
|
969
|
+
"/desk/autonomy",
|
|
970
|
+
"/desk/org-settings",
|
|
971
|
+
"/inbox/linkedin/accounts/{account_id}",
|
|
972
|
+
"/integrations/crm-sync/pull-enabled",
|
|
973
|
+
"/integrations/crm-sync/push-enabled",
|
|
974
|
+
"/integrations/crm/connections/{connection_id}/batch/contacts",
|
|
975
|
+
"/integrations/crm/connections/{connection_id}/companies/{company_id}",
|
|
976
|
+
"/integrations/crm/connections/{connection_id}/contacts/{contact_id}",
|
|
977
|
+
"/integrations/crm/connections/{connection_id}/deals/{deal_id}",
|
|
978
|
+
"/integrations/crm/connections/{connection_id}/leads/{lead_id}",
|
|
979
|
+
"/integrations/linkedin-outreach/workspaces/active",
|
|
980
|
+
"/linkedin/accounts/{account_id}/schedule",
|
|
981
|
+
"/newsletters/{newsletter_id}/issues/{issue_id}",
|
|
982
|
+
"/quote-settings",
|
|
983
|
+
"/quote-templates/{template_id}",
|
|
984
|
+
"/quotes/{quote_id}",
|
|
985
|
+
"/sms/phone-numbers/{phone_number}",
|
|
986
|
+
"/social/autopilot/{account_id}",
|
|
987
|
+
"/workflows/{action_id}"
|
|
988
|
+
]
|
|
989
|
+
};
|
|
990
|
+
|
|
335
991
|
// src/http.ts
|
|
336
992
|
var G8Error = class _G8Error extends Error {
|
|
337
993
|
constructor(args) {
|
|
@@ -349,9 +1005,70 @@ var G8Error = class _G8Error extends Error {
|
|
|
349
1005
|
function isRetryableStatus(status) {
|
|
350
1006
|
return status === 429 || status >= 500 && status <= 599;
|
|
351
1007
|
}
|
|
352
|
-
function
|
|
1008
|
+
function isWriteMethod(method) {
|
|
353
1009
|
const m = method.toUpperCase();
|
|
354
|
-
return m === "POST" || m === "PATCH";
|
|
1010
|
+
return m === "POST" || m === "PUT" || m === "PATCH" || m === "DELETE";
|
|
1011
|
+
}
|
|
1012
|
+
var API_BASE_SEGMENT = "/api/v1";
|
|
1013
|
+
var billableMatchers = null;
|
|
1014
|
+
var externalMatchers = null;
|
|
1015
|
+
function templateToRegexSource(template) {
|
|
1016
|
+
return template.split(/(\{[^}/]+\})/).map((part) => /^\{[^}/]+\}$/.test(part) ? "[^/]+" : part.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("");
|
|
1017
|
+
}
|
|
1018
|
+
function buildMatchers(routes) {
|
|
1019
|
+
const out = /* @__PURE__ */ new Map();
|
|
1020
|
+
for (const [m, templates] of Object.entries(routes)) {
|
|
1021
|
+
if (!templates.length) continue;
|
|
1022
|
+
out.set(m, new RegExp(`^(?:${templates.map(templateToRegexSource).join("|")})/?$`));
|
|
1023
|
+
}
|
|
1024
|
+
return out;
|
|
1025
|
+
}
|
|
1026
|
+
function matcherFor(method) {
|
|
1027
|
+
if (!billableMatchers) billableMatchers = buildMatchers(BILLABLE_ROUTES);
|
|
1028
|
+
return billableMatchers.get(method.toUpperCase());
|
|
1029
|
+
}
|
|
1030
|
+
function externalMatcherFor(method) {
|
|
1031
|
+
if (!externalMatchers) externalMatchers = buildMatchers(EXTERNAL_ROUTES);
|
|
1032
|
+
return externalMatchers.get(method.toUpperCase());
|
|
1033
|
+
}
|
|
1034
|
+
function apiRelativePath(urlOrPath) {
|
|
1035
|
+
let p = urlOrPath.replace(/^[a-zA-Z][a-zA-Z0-9+.-]*:\/\/[^/]*/, "");
|
|
1036
|
+
p = p.split(/[?#]/, 1)[0];
|
|
1037
|
+
const at = p.indexOf(API_BASE_SEGMENT + "/");
|
|
1038
|
+
if (at < 0) return null;
|
|
1039
|
+
return p.slice(at + API_BASE_SEGMENT.length);
|
|
1040
|
+
}
|
|
1041
|
+
function isBillableOperation(method, urlOrPath) {
|
|
1042
|
+
const matcher = matcherFor(method);
|
|
1043
|
+
if (!matcher) return false;
|
|
1044
|
+
const p = apiRelativePath(urlOrPath);
|
|
1045
|
+
return p != null && matcher.test(p);
|
|
1046
|
+
}
|
|
1047
|
+
function isExternalOperation(method, urlOrPath) {
|
|
1048
|
+
const matcher = externalMatcherFor(method);
|
|
1049
|
+
if (!matcher) return false;
|
|
1050
|
+
const p = apiRelativePath(urlOrPath);
|
|
1051
|
+
return p != null && matcher.test(p);
|
|
1052
|
+
}
|
|
1053
|
+
function isNoBlindRetryOperation(method, urlOrPath) {
|
|
1054
|
+
return isBillableOperation(method, urlOrPath) || isExternalOperation(method, urlOrPath);
|
|
1055
|
+
}
|
|
1056
|
+
var PRE_SEND_ERROR_CODES = /* @__PURE__ */ new Set([
|
|
1057
|
+
"ECONNREFUSED",
|
|
1058
|
+
"ENOTFOUND",
|
|
1059
|
+
"EAI_AGAIN",
|
|
1060
|
+
"ENETUNREACH",
|
|
1061
|
+
"EHOSTUNREACH",
|
|
1062
|
+
"UND_ERR_CONNECT_TIMEOUT"
|
|
1063
|
+
]);
|
|
1064
|
+
function isPreSendNetworkError(err) {
|
|
1065
|
+
let cur = err;
|
|
1066
|
+
for (let depth = 0; cur && depth < 4; depth++) {
|
|
1067
|
+
if (typeof cur.code === "string" && PRE_SEND_ERROR_CODES.has(cur.code)) return true;
|
|
1068
|
+
if (Array.isArray(cur.errors) && cur.errors.some((e) => isPreSendNetworkError(e))) return true;
|
|
1069
|
+
cur = cur.cause;
|
|
1070
|
+
}
|
|
1071
|
+
return false;
|
|
355
1072
|
}
|
|
356
1073
|
function newIdempotencyKey() {
|
|
357
1074
|
const c = globalThis.crypto;
|
|
@@ -389,7 +1106,7 @@ function buildQuery(query) {
|
|
|
389
1106
|
const s = qs.toString();
|
|
390
1107
|
return s ? `?${s}` : "";
|
|
391
1108
|
}
|
|
392
|
-
async function toG8Error(resp) {
|
|
1109
|
+
async function toG8Error(resp, retryable = isRetryableStatus(resp.status)) {
|
|
393
1110
|
let body = void 0;
|
|
394
1111
|
try {
|
|
395
1112
|
const text = await resp.text();
|
|
@@ -406,9 +1123,36 @@ async function toG8Error(resp) {
|
|
|
406
1123
|
code: typeof env.code === "string" ? env.code : String(resp.status),
|
|
407
1124
|
requestId: typeof env.request_id === "string" && env.request_id || resp.headers.get("x-request-id") || void 0,
|
|
408
1125
|
detail: env.detail,
|
|
409
|
-
retryable
|
|
1126
|
+
retryable
|
|
410
1127
|
});
|
|
411
1128
|
}
|
|
1129
|
+
var TARGET_ORG_HEADER = "x-target-org-id";
|
|
1130
|
+
var nonAgencyKeys = /* @__PURE__ */ new Set();
|
|
1131
|
+
var warnedTargetOrgKeys = /* @__PURE__ */ new Set();
|
|
1132
|
+
function keyFingerprint(apiKey) {
|
|
1133
|
+
let h = 2166136261;
|
|
1134
|
+
for (let i = 0; i < apiKey.length; i++) {
|
|
1135
|
+
h ^= apiKey.charCodeAt(i);
|
|
1136
|
+
h = Math.imul(h, 16777619) >>> 0;
|
|
1137
|
+
}
|
|
1138
|
+
return `${apiKey.length}:${h.toString(36)}`;
|
|
1139
|
+
}
|
|
1140
|
+
function noteAgencyStatus(apiKey, isAgency) {
|
|
1141
|
+
const fp = keyFingerprint(apiKey);
|
|
1142
|
+
if (isAgency) nonAgencyKeys.delete(fp);
|
|
1143
|
+
else nonAgencyKeys.add(fp);
|
|
1144
|
+
}
|
|
1145
|
+
function warnIfTargetOrgIgnored(apiKey, headers) {
|
|
1146
|
+
if (!Object.keys(headers).some((h) => h.toLowerCase() === TARGET_ORG_HEADER)) return;
|
|
1147
|
+
const fp = keyFingerprint(apiKey);
|
|
1148
|
+
if (!nonAgencyKeys.has(fp) || warnedTargetOrgKeys.has(fp)) return;
|
|
1149
|
+
warnedTargetOrgKeys.add(fp);
|
|
1150
|
+
if (typeof console !== "undefined" && typeof console.warn === "function") {
|
|
1151
|
+
console.warn(
|
|
1152
|
+
"[@graph8/sdk] X-Target-Org-Id is set, but the server reported this API key is not an agency key. The header is ignored for non-agency keys: this call runs against the key's own org. Use an agency key (minted with is_agency=true) to target a client org."
|
|
1153
|
+
);
|
|
1154
|
+
}
|
|
1155
|
+
}
|
|
412
1156
|
async function request(baseUrl, path, apiKey, opts = {}) {
|
|
413
1157
|
const {
|
|
414
1158
|
method = "GET",
|
|
@@ -428,8 +1172,10 @@ async function request(baseUrl, path, apiKey, opts = {}) {
|
|
|
428
1172
|
Authorization: `Bearer ${apiKey}`,
|
|
429
1173
|
...headers
|
|
430
1174
|
};
|
|
431
|
-
|
|
1175
|
+
warnIfTargetOrgIgnored(apiKey, headers);
|
|
1176
|
+
const effectiveIdempotencyKey = idempotencyKey ?? (maxRetries > 0 && isWriteMethod(method) ? newIdempotencyKey() : void 0);
|
|
432
1177
|
if (effectiveIdempotencyKey) finalHeaders["Idempotency-Key"] = effectiveIdempotencyKey;
|
|
1178
|
+
const billable = isNoBlindRetryOperation(method, url);
|
|
433
1179
|
let attempt = 0;
|
|
434
1180
|
for (; ; ) {
|
|
435
1181
|
let resp;
|
|
@@ -441,7 +1187,8 @@ async function request(baseUrl, path, apiKey, opts = {}) {
|
|
|
441
1187
|
signal
|
|
442
1188
|
});
|
|
443
1189
|
} catch (err) {
|
|
444
|
-
|
|
1190
|
+
const safeToRetry = !billable || isPreSendNetworkError(err);
|
|
1191
|
+
if (attempt < maxRetries && safeToRetry) {
|
|
445
1192
|
await sleepImpl(backoffDelayMs(attempt, retryBaseMs));
|
|
446
1193
|
attempt++;
|
|
447
1194
|
continue;
|
|
@@ -450,21 +1197,22 @@ async function request(baseUrl, path, apiKey, opts = {}) {
|
|
|
450
1197
|
message: `Network error: ${err?.message ?? "request failed"}`,
|
|
451
1198
|
status: 0,
|
|
452
1199
|
type: "network_error",
|
|
453
|
-
retryable:
|
|
1200
|
+
retryable: safeToRetry
|
|
454
1201
|
});
|
|
455
1202
|
}
|
|
456
1203
|
if (resp.ok) {
|
|
457
1204
|
const text = await resp.text();
|
|
458
1205
|
return text ? JSON.parse(text) : void 0;
|
|
459
1206
|
}
|
|
460
|
-
|
|
1207
|
+
const statusRetryable = isRetryableStatus(resp.status) && (!billable || resp.status === 429);
|
|
1208
|
+
if (statusRetryable && attempt < maxRetries) {
|
|
461
1209
|
const retryAfter = parseRetryAfter(resp.headers.get("retry-after"));
|
|
462
1210
|
const delay = retryAfter != null ? retryAfter : backoffDelayMs(attempt, retryBaseMs);
|
|
463
1211
|
await sleepImpl(delay);
|
|
464
1212
|
attempt++;
|
|
465
1213
|
continue;
|
|
466
1214
|
}
|
|
467
|
-
throw await toG8Error(resp);
|
|
1215
|
+
throw await toG8Error(resp, billable ? statusRetryable : isRetryableStatus(resp.status));
|
|
468
1216
|
}
|
|
469
1217
|
}
|
|
470
1218
|
async function* paginate(fetchPage) {
|
|
@@ -693,30 +1441,74 @@ var createCampaignsClient = (apiKey, apiUrl) => {
|
|
|
693
1441
|
|
|
694
1442
|
// src/signals.ts
|
|
695
1443
|
var DEFAULT_API9 = "https://be.graph8.com";
|
|
1444
|
+
var INTENT_READ_HINT = "g8.signals needs an API key with the intent:read scope. Personal keys and keys minted before scoped keys do not carry it. Mint a key with intent:read (Settings > API keys), or pass a writeKey to g8.init() to read signals with the browser write key.";
|
|
1445
|
+
function explainSignalsError(err) {
|
|
1446
|
+
if (err instanceof G8Error && err.status === 403) {
|
|
1447
|
+
throw new G8Error({
|
|
1448
|
+
message: `${INTENT_READ_HINT} (server said: ${err.message})`,
|
|
1449
|
+
status: err.status,
|
|
1450
|
+
type: err.type,
|
|
1451
|
+
code: err.code,
|
|
1452
|
+
requestId: err.requestId,
|
|
1453
|
+
detail: err.detail,
|
|
1454
|
+
retryable: false
|
|
1455
|
+
});
|
|
1456
|
+
}
|
|
1457
|
+
throw err;
|
|
1458
|
+
}
|
|
696
1459
|
var createSignalsClient = (key, isApiKey, apiUrl) => {
|
|
697
1460
|
const baseUrl = apiUrl || DEFAULT_API9;
|
|
698
1461
|
const headers = () => isApiKey ? { "Content-Type": "application/json", "Authorization": `Bearer ${key}` } : { "Content-Type": "application/json", "X-Write-Key": key };
|
|
699
1462
|
const endpoint = "/api/v1/public/signals/company";
|
|
700
1463
|
return {
|
|
701
|
-
/**
|
|
1464
|
+
/**
|
|
1465
|
+
* Get intent signals for a specific company domain.
|
|
1466
|
+
*
|
|
1467
|
+
* With an API key this throws a `G8Error` on any failure; a 403 means the
|
|
1468
|
+
* key lacks the `intent:read` scope. With a write key only, a failure still
|
|
1469
|
+
* resolves to an all-zeros result (legacy browser behaviour).
|
|
1470
|
+
*/
|
|
702
1471
|
async company(domain) {
|
|
1472
|
+
if (isApiKey) {
|
|
1473
|
+
const body = await request(baseUrl, endpoint, key, {
|
|
1474
|
+
query: { domain }
|
|
1475
|
+
}).catch(explainSignalsError);
|
|
1476
|
+
return body?.data || body;
|
|
1477
|
+
}
|
|
703
1478
|
const resp = await fetch(`${baseUrl}${endpoint}?domain=${encodeURIComponent(domain)}`, { headers: headers() });
|
|
704
1479
|
if (!resp.ok) return { domain, score: 0, intent: "low", signals: [], last_seen: null };
|
|
705
1480
|
const data = await resp.json();
|
|
706
1481
|
return data.data || data;
|
|
707
1482
|
},
|
|
708
|
-
/**
|
|
1483
|
+
/**
|
|
1484
|
+
* Stream intent signals - calls callback every 30s with latest data.
|
|
1485
|
+
*
|
|
1486
|
+
* A failed poll is skipped. An auth failure (401/403) cannot fix itself by
|
|
1487
|
+
* waiting, so it stops the stream and is logged once instead of polling a
|
|
1488
|
+
* forbidden route every 30s forever.
|
|
1489
|
+
*/
|
|
709
1490
|
stream(domains, callback) {
|
|
1491
|
+
let interval;
|
|
1492
|
+
let stopped = false;
|
|
1493
|
+
const stop = () => {
|
|
1494
|
+
stopped = true;
|
|
1495
|
+
if (interval !== void 0) clearInterval(interval);
|
|
1496
|
+
};
|
|
710
1497
|
const check = async () => {
|
|
711
1498
|
try {
|
|
712
1499
|
const results = await Promise.all(domains.map((d) => this.company(d)));
|
|
713
|
-
callback(results);
|
|
714
|
-
} catch {
|
|
1500
|
+
if (!stopped) callback(results);
|
|
1501
|
+
} catch (err) {
|
|
1502
|
+
if (err instanceof G8Error && (err.status === 401 || err.status === 403)) {
|
|
1503
|
+
stop();
|
|
1504
|
+
if (typeof console !== "undefined") console.warn(`[@graph8/sdk] signals.stream stopped: ${err.message}`);
|
|
1505
|
+
}
|
|
715
1506
|
}
|
|
716
1507
|
};
|
|
717
1508
|
check();
|
|
718
|
-
|
|
719
|
-
|
|
1509
|
+
interval = setInterval(check, 3e4);
|
|
1510
|
+
if (stopped) clearInterval(interval);
|
|
1511
|
+
return stop;
|
|
720
1512
|
}
|
|
721
1513
|
};
|
|
722
1514
|
};
|
|
@@ -758,8 +1550,14 @@ var createVoiceClient = (apiKey, apiUrl) => {
|
|
|
758
1550
|
return resp.data ?? resp;
|
|
759
1551
|
},
|
|
760
1552
|
/**
|
|
761
|
-
* Resume a PAUSED dialer session.
|
|
762
|
-
*
|
|
1553
|
+
* Resume a PAUSED dialer session.
|
|
1554
|
+
*
|
|
1555
|
+
* @deprecated The server route is retired and answers 410 (it never dialed:
|
|
1556
|
+
* it forwarded to a voice path that did not exist, and the LiveKit dialer it
|
|
1557
|
+
* targeted has been removed). Resume with
|
|
1558
|
+
* `g8.api.call("dial_next_batch_dialer_sessions__session_id__next_batch_post",
|
|
1559
|
+
* { path: { session_id }, body: { resume_intent: true } })`; the rep must have
|
|
1560
|
+
* the dialer open to take the calls.
|
|
763
1561
|
* @param maxContacts 1-4 (voice caps parallel dialing at 4). Default 4.
|
|
764
1562
|
*/
|
|
765
1563
|
async resumeSession(sessionId, maxContacts = 4) {
|
|
@@ -913,7 +1711,61 @@ var KNOWN_WEBHOOK_EVENTS = [
|
|
|
913
1711
|
"crm.record.created",
|
|
914
1712
|
"crm.record.updated",
|
|
915
1713
|
"crm.record.archived",
|
|
916
|
-
"crm.record.restored"
|
|
1714
|
+
"crm.record.restored",
|
|
1715
|
+
"sequence.contact_enrolled",
|
|
1716
|
+
"sequence.contact_removed",
|
|
1717
|
+
"sequence.step_completed",
|
|
1718
|
+
"sequence.step_failed",
|
|
1719
|
+
"engagement.contact_unsubscribed",
|
|
1720
|
+
"engagement.sms_delivered",
|
|
1721
|
+
"engagement.sms_failed",
|
|
1722
|
+
"engagement.whatsapp_delivered",
|
|
1723
|
+
"engagement.whatsapp_failed",
|
|
1724
|
+
"engagement.call_started",
|
|
1725
|
+
"engagement.call_completed",
|
|
1726
|
+
"engagement.call_disposition_set",
|
|
1727
|
+
"engagement.voicemail_detected",
|
|
1728
|
+
"engagement.voicemail_left",
|
|
1729
|
+
"engagement.email_clicked",
|
|
1730
|
+
"engagement.link_clicked",
|
|
1731
|
+
"engagement.call_recording_ready",
|
|
1732
|
+
"meeting.no_show",
|
|
1733
|
+
"voice_ai.call_started",
|
|
1734
|
+
"voice_ai.call_completed",
|
|
1735
|
+
"voice_ai.voicemail_left",
|
|
1736
|
+
"deal.created",
|
|
1737
|
+
"deal.updated",
|
|
1738
|
+
"deal.stage_changed",
|
|
1739
|
+
"deal.deleted",
|
|
1740
|
+
"quote.created",
|
|
1741
|
+
"quote.updated",
|
|
1742
|
+
"quote.sent",
|
|
1743
|
+
"quote.resent",
|
|
1744
|
+
"quote.resend_failed",
|
|
1745
|
+
"quote.link_generated",
|
|
1746
|
+
"quote.viewed",
|
|
1747
|
+
"quote.accepted",
|
|
1748
|
+
"quote.declined",
|
|
1749
|
+
"quote.expired",
|
|
1750
|
+
"quote.voided",
|
|
1751
|
+
"quote.superseded",
|
|
1752
|
+
"quote.archived",
|
|
1753
|
+
"quote.unarchived",
|
|
1754
|
+
"quote.payment_received",
|
|
1755
|
+
"quote.payment_failed",
|
|
1756
|
+
"quote.subscription_canceled",
|
|
1757
|
+
"quote.provisioned",
|
|
1758
|
+
"form.submitted",
|
|
1759
|
+
"visitor.identified",
|
|
1760
|
+
"intent.signal",
|
|
1761
|
+
"task.created",
|
|
1762
|
+
"task.updated",
|
|
1763
|
+
"task.completed",
|
|
1764
|
+
"task.deleted",
|
|
1765
|
+
"enrichment.job_completed",
|
|
1766
|
+
"enrichment.job_failed",
|
|
1767
|
+
"workflow.execution_completed",
|
|
1768
|
+
"workflow.execution_failed"
|
|
917
1769
|
];
|
|
918
1770
|
var WebhookSignatureError = class extends Error {
|
|
919
1771
|
constructor(message) {
|
|
@@ -1253,7 +2105,7 @@ var createMailboxesClient = (apiKey, apiUrl) => {
|
|
|
1253
2105
|
};
|
|
1254
2106
|
|
|
1255
2107
|
// src/generated/operations.ts
|
|
1256
|
-
var API_OPERATION_COUNT =
|
|
2108
|
+
var API_OPERATION_COUNT = 3247;
|
|
1257
2109
|
var API_OPERATIONS = {
|
|
1258
2110
|
accept_audience_pipeline_filters_campaigns__campaign_id__audience_pipeline_accept_filters_post: ["POST", "/campaigns/{campaign_id}/audience-pipeline/accept-filters", "campaigns", "acceptAudiencePipelineFilters", "billable", "campaigns:run"],
|
|
1259
2111
|
accept_my_offer_marketplace_me_offers__hiring_id__accept_post: ["POST", "/marketplace/me/offers/{hiring_id}/accept", "marketplace", "acceptMyOffer", "billable", "marketplace:run"],
|
|
@@ -3249,6 +4101,7 @@ var API_OPERATIONS = {
|
|
|
3249
4101
|
list_onboarding_threads_voice_campaigns_onboarding_threads_get: ["GET", "/voice/campaigns/onboarding/threads", "voice", "listOnboardingThreads", "read", "voice:read"],
|
|
3250
4102
|
list_ooo_appointments_out_of_office_get: ["GET", "/appointments/out-of-office", "appointments", "listOoo", "read", "meetings:read"],
|
|
3251
4103
|
list_opportunities_radar_opportunities_get: ["GET", "/radar/opportunities", "radar", "listOpportunities", "read", "radar:read"],
|
|
4104
|
+
list_org_events_events_get: ["GET", "/events", "events", "listOrgEvents", "read", "analytics:read"],
|
|
3252
4105
|
list_org_marketplace_hirings_marketplace_org_hirings_get: ["GET", "/marketplace/org/hirings", "marketplace", "listOrgMarketplaceHirings", "read", "marketplace:read"],
|
|
3253
4106
|
list_org_marketplace_invoices_marketplace_org_invoices_get: ["GET", "/marketplace/org/invoices", "marketplace", "listOrgMarketplaceInvoices", "read", "marketplace:read"],
|
|
3254
4107
|
list_org_marketplace_meetings_marketplace_org_meetings_get: ["GET", "/marketplace/org/meetings", "marketplace", "listOrgMarketplaceMeetings", "read", "marketplace:read"],
|
|
@@ -6067,17 +6920,35 @@ var createSearchClient = (apiKey, apiUrl) => {
|
|
|
6067
6920
|
|
|
6068
6921
|
// src/agency.ts
|
|
6069
6922
|
var DEFAULT_API35 = "https://be.graph8.com";
|
|
6923
|
+
function mentionsAgencyRequirement(err) {
|
|
6924
|
+
const text = `${err.message} ${typeof err.detail === "string" ? err.detail : JSON.stringify(err.detail ?? "")}`;
|
|
6925
|
+
return /agency-scoped/i.test(text);
|
|
6926
|
+
}
|
|
6070
6927
|
var createAgencyClient = (apiKey, apiUrl) => {
|
|
6071
6928
|
const baseUrl = apiUrl || DEFAULT_API35;
|
|
6929
|
+
const recordingAgencyStatus = async (call) => {
|
|
6930
|
+
try {
|
|
6931
|
+
return await call();
|
|
6932
|
+
} catch (err) {
|
|
6933
|
+
if (err instanceof G8Error && err.status === 403 && mentionsAgencyRequirement(err)) {
|
|
6934
|
+
noteAgencyStatus(apiKey, false);
|
|
6935
|
+
}
|
|
6936
|
+
throw err;
|
|
6937
|
+
}
|
|
6938
|
+
};
|
|
6072
6939
|
return {
|
|
6073
6940
|
/** Describe the agency credential: agency org + authorized client count. */
|
|
6074
6941
|
async me() {
|
|
6075
|
-
const resp = await
|
|
6076
|
-
|
|
6942
|
+
const resp = await recordingAgencyStatus(
|
|
6943
|
+
() => request(baseUrl, "/api/v1/agency/me", apiKey)
|
|
6944
|
+
);
|
|
6945
|
+
const info = resp.data ?? resp;
|
|
6946
|
+
if (typeof info?.is_agency === "boolean") noteAgencyStatus(apiKey, info.is_agency);
|
|
6947
|
+
return info;
|
|
6077
6948
|
},
|
|
6078
6949
|
/** List the client orgs this agency key may target via `X-Target-Org-Id`. */
|
|
6079
6950
|
async clients() {
|
|
6080
|
-
return request(baseUrl, "/api/v1/agency/clients", apiKey);
|
|
6951
|
+
return recordingAgencyStatus(() => request(baseUrl, "/api/v1/agency/clients", apiKey));
|
|
6081
6952
|
}
|
|
6082
6953
|
};
|
|
6083
6954
|
};
|