@graph8/sdk 0.238.0 → 0.244.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/dist/react.mjs CHANGED
@@ -287,6 +287,662 @@ var createCalendarClient = (apiUrl) => {
287
287
  };
288
288
  };
289
289
 
290
+ // src/generated/billable.ts
291
+ var BILLABLE_ROUTES = {
292
+ GET: [
293
+ "/apps/{app_id}/runtime",
294
+ "/audience-syncs/{config_id}/runs",
295
+ "/campaigns/{campaign_id}/dashboard",
296
+ "/companies/{company_id}/next-best-step",
297
+ "/contacts/{contact_id}/next-best-step",
298
+ "/desk/kickoff",
299
+ "/desk/kickoff/audio",
300
+ "/radar/competitors/{competitor_id}/discover-pages",
301
+ "/repos/{repo_id}/scan",
302
+ "/seo/domains/{domain}/backlinks",
303
+ "/seo/domains/{domain}/overview",
304
+ "/voice/campaigns/call-scripts",
305
+ "/voice/campaigns/email-templates",
306
+ "/voice/campaigns/templates",
307
+ "/voice/research/business-data",
308
+ "/voice/research/competitors",
309
+ "/voice/research/faq",
310
+ "/voice/research/keywords",
311
+ "/voice/research/prospect-company",
312
+ "/work/routines/{routine_id}/runs"
313
+ ],
314
+ PATCH: [
315
+ "/enrichment/auto-enrichment/configs/{config_id}",
316
+ "/intent/keywords/{keyword_id}",
317
+ "/intent/keywords/{keyword_id}/sync-config",
318
+ "/marketplace/agencies/{slug}",
319
+ "/marketplace/agencies/{slug}/reps/{sdr_id}",
320
+ "/marketplace/agencies/{slug}/service-statements/{statement_id}",
321
+ "/marketplace/applications/{application_id}",
322
+ "/marketplace/conversations/{conversation_id}/state",
323
+ "/marketplace/job-posts/{post_id}",
324
+ "/marketplace/me/meetings/{meeting_id}",
325
+ "/marketplace/me/messages/{conversation_id}/state",
326
+ "/marketplace/me/profile",
327
+ "/marketplace/me/service-statements/{statement_id}",
328
+ "/marketplace/org/meetings/{meeting_id}",
329
+ "/radar/competitors/{competitor_id}",
330
+ "/radar/gaps/{gap_id}",
331
+ "/research-reports/{report_id}",
332
+ "/social-listeners/settings",
333
+ "/social-listeners/{listener_id}"
334
+ ],
335
+ POST: [
336
+ "/accounts/{account_id}/generate-outreach-plan",
337
+ "/accounts/{account_id}/security-questionnaires",
338
+ "/accounts/{account_id}/stakeholders/{stakeholder_id}/generate-outreach",
339
+ "/ad-creatives",
340
+ "/ad-creatives/batch",
341
+ "/ad-creatives/concepts",
342
+ "/ad-creatives/video/clips",
343
+ "/ad-creatives/video/clips/prompt-enhance",
344
+ "/ad-creatives/video/clips/{clip_id}/continue",
345
+ "/ad-creatives/video/clips/{clip_id}/extend",
346
+ "/ad-creatives/video/clips/{clip_id}/regenerate",
347
+ "/ad-creatives/{creative_id}/ai-review",
348
+ "/ad-creatives/{creative_id}/chat-edit",
349
+ "/ad-creatives/{creative_id}/image-edit-at-point",
350
+ "/ad-creatives/{creative_id}/persona-lens",
351
+ "/ad-creatives/{creative_id}/regenerate-copy",
352
+ "/ad-creatives/{creative_id}/regenerate-image",
353
+ "/ad-creatives/{creative_id}/retry",
354
+ "/ad-creatives/{creative_id}/rewrite-field",
355
+ "/ad-creatives/{creative_id}/size-set",
356
+ "/agent/chat",
357
+ "/agent/onboarding/discovery/turn",
358
+ "/agent/operators/{operator}/approvals/{task_id}/decide",
359
+ "/agent/sessions/{session_id}/voice",
360
+ "/agent/work-items",
361
+ "/app-pages/{page_id}/generate",
362
+ "/campaigns/generate-ideas",
363
+ "/campaigns/generate-ideas-async",
364
+ "/campaigns/recommend-personas",
365
+ "/campaigns/{campaign_id}/audience-pipeline/accept-filters",
366
+ "/campaigns/{campaign_id}/audience-pipeline/trigger",
367
+ "/campaigns/{campaign_id}/documents/{document_id}/regenerate",
368
+ "/campaigns/{campaign_id}/sequence/steps/{step_id}/generate",
369
+ "/companies/enrich/bulk",
370
+ "/companies/enrich/people/bulk",
371
+ "/companies/enrich/stakeholders/bulk",
372
+ "/companies/import",
373
+ "/companies/{company_id}/documents/types/{doc_type}/generate",
374
+ "/companies/{company_id}/documents/types/{doc_type}/regenerate",
375
+ "/companies/{company_id}/enrich",
376
+ "/companies/{company_id}/retry-intelligence",
377
+ "/companies/{company_id}/retry-synthesis",
378
+ "/companies/{company_id}/workflows/{workflow_type}/start",
379
+ "/company-profile/generate",
380
+ "/company-profile/reindex",
381
+ "/company-profile/retry",
382
+ "/contacts/unlock-info",
383
+ "/contacts/verify-email",
384
+ "/contacts/verify-email/async",
385
+ "/contacts/workflow-executions/run",
386
+ "/contacts/{contact_id}/documents/generate-all",
387
+ "/contacts/{contact_id}/documents/types/{doc_type}/generate",
388
+ "/contacts/{contact_id}/documents/types/{doc_type}/regenerate",
389
+ "/content-workspace/import/crawl",
390
+ "/content/calendar/ideas/{idea_id}/create-content",
391
+ "/content/calendar/mine-signals",
392
+ "/content/calendar/repurpose/ad",
393
+ "/content/calendar/repurpose/linkedin-post",
394
+ "/content/grids/{grid_id}/columns/{column_id}/run",
395
+ "/content/grids/{grid_id}/rows/{row_id}/run/{column_id}",
396
+ "/content/pages/enrich-seo-bulk",
397
+ "/content/pages/{page_id}/enrich-seo",
398
+ "/copilot/chat",
399
+ "/copilot/landing-page-action",
400
+ "/copilot/memory/promote",
401
+ "/customer-success/companies/{company_id}/brief/synthesize",
402
+ "/deals/{deal_id}/documents/generate-all",
403
+ "/deals/{deal_id}/documents/types/{doc_type}/generate",
404
+ "/deals/{deal_id}/documents/types/{doc_type}/regenerate",
405
+ "/deals/{deal_id}/next-best-step",
406
+ "/desk/accounts/{account_id}/committee/{contact_id}/find-linkedin",
407
+ "/desk/accounts/{account_id}/plan/draft",
408
+ "/desk/ask",
409
+ "/desk/decisions/{decision_id}/replan",
410
+ "/desk/email-improve",
411
+ "/desk/email-score",
412
+ "/desk/org-settings/plan-stages/run",
413
+ "/desk/voice-memo",
414
+ "/dialer/parallel-calls/grading/backfill",
415
+ "/dialer/sessions/prewarm-voicemails",
416
+ "/enrichment/ai-formula/generate",
417
+ "/enrichment/ai-formula/generate-condition",
418
+ "/enrichment/ai/batch/enrich",
419
+ "/enrichment/ai/enrich",
420
+ "/enrichment/ai/qualification/generate-templates",
421
+ "/enrichment/ai/qualification/run",
422
+ "/enrichment/auto-enrichment/configs",
423
+ "/enrichment/enrich",
424
+ "/enrichment/find-people/configure",
425
+ "/enrichment/find-people/search-import",
426
+ "/enrichment/find-people/{config_id}/import",
427
+ "/enrichment/find-people/{config_id}/preview",
428
+ "/enrichment/find-people/{config_id}/run",
429
+ "/enrichment/generate-prompt",
430
+ "/enrichment/jobs/{job_id}/resume",
431
+ "/enrichment/list-routing/generate-filter",
432
+ "/enrichment/lists/{list_id}/pipelines",
433
+ "/enrichment/lists/{list_id}/pipelines/ai-draft",
434
+ "/enrichment/lists/{list_id}/pipelines/{pipeline_id}/enabled",
435
+ "/enrichment/lists/{list_id}/pipelines/{pipeline_id}/runs",
436
+ "/enrichment/lookup/company",
437
+ "/enrichment/lookup/person",
438
+ "/enrichment/record-sync/{entity_type}/run",
439
+ "/enrichment/verify-email",
440
+ "/enrichment/waterfall/configs",
441
+ "/enrichment/waterfall/enrich",
442
+ "/global-context/generate-all",
443
+ "/global-context/generate/{doc_type}",
444
+ "/hiring-signals/aggregators",
445
+ "/hiring-signals/companies",
446
+ "/hiring-signals/companies/job-counts",
447
+ "/hiring-signals/companies/resolve-ids",
448
+ "/hiring-signals/decision-makers",
449
+ "/hiring-signals/job-changes/match",
450
+ "/hiring-signals/jobs",
451
+ "/hiring-signals/recruiters",
452
+ "/icps/generate",
453
+ "/inbox/drafts/generate",
454
+ "/intelligence/analyze",
455
+ "/intelligence/retry",
456
+ "/intent/contacts/metadata",
457
+ "/intent/keywords/add",
458
+ "/intent/keywords/auto-seed-proposals",
459
+ "/intent/keywords/create-from-domain",
460
+ "/intent/keywords/create-from-search",
461
+ "/intent/keywords/list",
462
+ "/intent/keywords/{keyword_id}/companies",
463
+ "/intent/keywords/{keyword_id}/contacts",
464
+ "/intent/keywords/{keyword_id}/filters",
465
+ "/intent/keywords/{keyword_id}/job-resolution",
466
+ "/intent/keywords/{keyword_id}/sync",
467
+ "/intent/keywords/{keyword_id}/urls",
468
+ "/intent/pages-by-domain",
469
+ "/intent/pages/contacts",
470
+ "/intent/pages/search",
471
+ "/intent/pages/visitor-counts",
472
+ "/intent/pages/visitors",
473
+ "/landing-pages",
474
+ "/landing-pages/clone-homepage",
475
+ "/landing-pages/clone-html",
476
+ "/landing-pages/clone-url",
477
+ "/landing-pages/components/extract",
478
+ "/landing-pages/ensure-base-template",
479
+ "/landing-pages/{landing_page_id}/ai-review",
480
+ "/landing-pages/{landing_page_id}/ai-review/fix-with-ai",
481
+ "/landing-pages/{landing_page_id}/edit",
482
+ "/landing-pages/{landing_page_id}/edit-element",
483
+ "/landing-pages/{landing_page_id}/edit-page",
484
+ "/landing-pages/{landing_page_id}/generate-seo-metadata",
485
+ "/landing-pages/{landing_page_id}/rewrite-text",
486
+ "/leads/generate-content/batches",
487
+ "/leads/{lead_id}/generate-content",
488
+ "/library/case-studies/backfill",
489
+ "/lifecycle-contacts/unlock",
490
+ "/mailboxes/schedule-buy/plans",
491
+ "/mailboxes/schedule-buy/plans/{plan_id}/resume",
492
+ "/mailboxes/uncancel",
493
+ "/mailboxes/{mailbox_id}/health/placement-test",
494
+ "/marketplace/agencies/{slug}/intake/upload",
495
+ "/marketplace/agencies/{slug}/reps/{sdr_id}/unlist",
496
+ "/marketplace/agencies/{slug}/reps/{sdr_id}/video-intro",
497
+ "/marketplace/agencies/{slug}/service-statements",
498
+ "/marketplace/agencies/{slug}/service-statements/{statement_id}/line-items",
499
+ "/marketplace/agencies/{slug}/service-statements/{statement_id}/submit",
500
+ "/marketplace/commissions/entries",
501
+ "/marketplace/commissions/entries/{entry_id}/quality",
502
+ "/marketplace/commissions/entries/{entry_id}/reversals",
503
+ "/marketplace/commissions/entries/{entry_id}/statement",
504
+ "/marketplace/commissions/plans",
505
+ "/marketplace/commissions/plans/{version_id}/activate",
506
+ "/marketplace/commissions/preview",
507
+ "/marketplace/conversations/{conversation_id}/read",
508
+ "/marketplace/job-posts",
509
+ "/marketplace/job-posts/{post_id}/jd",
510
+ "/marketplace/me/headshot",
511
+ "/marketplace/me/invoices",
512
+ "/marketplace/me/invoices/{invoice_id}/approve",
513
+ "/marketplace/me/messages/{conversation_id}/read",
514
+ "/marketplace/me/offers/{hiring_id}/accept",
515
+ "/marketplace/me/offers/{hiring_id}/reject",
516
+ "/marketplace/me/payout-account/w8-certify",
517
+ "/marketplace/me/resume",
518
+ "/marketplace/me/service-statements",
519
+ "/marketplace/me/service-statements/{statement_id}/line-items",
520
+ "/marketplace/me/service-statements/{statement_id}/revise",
521
+ "/marketplace/me/service-statements/{statement_id}/submit",
522
+ "/marketplace/me/video-intro",
523
+ "/marketplace/me/work-certificates",
524
+ "/marketplace/opportunities/{post_id}/apply",
525
+ "/marketplace/org/hirings/{hiring_id}/meetings",
526
+ "/marketplace/org/hirings/{hiring_id}/terminate",
527
+ "/marketplace/org/hirings/{hiring_id}/withdraw",
528
+ "/marketplace/org/invoices/{invoice_id}/approve",
529
+ "/marketplace/org/invoices/{invoice_id}/dispute",
530
+ "/marketplace/org/service-statements/{statement_id}/approve",
531
+ "/marketplace/org/service-statements/{statement_id}/line-items",
532
+ "/marketplace/org/service-statements/{statement_id}/reject",
533
+ "/marketplace/org/service-statements/{statement_id}/request-changes",
534
+ "/marketplace/shortlist/export",
535
+ "/marketplace/talent/{sdr_id}/hire",
536
+ "/marketplace/talent/{sdr_id}/match/analyze",
537
+ "/marketplace/talent/{sdr_id}/match/refresh",
538
+ "/marketplace/terms-acknowledgements/ack-all",
539
+ "/meeting-transcripts/{transcript_id}/follow-up-draft",
540
+ "/meeting-transcripts/{transcript_id}/review/regenerate",
541
+ "/newsletters/templates/clone",
542
+ "/newsletters/templates/custom",
543
+ "/newsletters/templates/layout",
544
+ "/newsletters/{newsletter_id}/issues/{issue_id}/generate",
545
+ "/newsletters/{newsletter_id}/issues/{issue_id}/rewrite-text",
546
+ "/newsletters/{newsletter_id}/subscribers/import-audience",
547
+ "/newsletters/{newsletter_id}/subscribers/verify",
548
+ "/org-videos/generate",
549
+ "/org/brand-snapshot/refresh",
550
+ "/personas/generate",
551
+ "/phone-numbers/purchase",
552
+ "/pipelines/suggest",
553
+ "/placement/tests",
554
+ "/provider-domains/add-external",
555
+ "/provider-domains/check-availability",
556
+ "/provider-domains/checkout-purchase",
557
+ "/provider-domains/checkout-transfer",
558
+ "/provider-domains/{domain_id}/auto-warmup",
559
+ "/provider-domains/{domain_id}/check-propagation",
560
+ "/provider-domains/{domain_id}/checkout-mailboxes",
561
+ "/provider-domains/{domain_id}/connect-provider",
562
+ "/provider-domains/{domain_id}/dns",
563
+ "/public/enrich/lookup",
564
+ "/radar/aeo/run",
565
+ "/radar/competitors",
566
+ "/radar/competitors/bulk",
567
+ "/radar/competitors/{competitor_id}/scan",
568
+ "/radar/gaps/analyze",
569
+ "/radar/initiatives/measure",
570
+ "/radar/opportunities/approve-all",
571
+ "/radar/opportunities/{gap_id}/approve",
572
+ "/radar/reports",
573
+ "/radar/scan-all",
574
+ "/repos/{repo_id}/scan",
575
+ "/research-reports/generate",
576
+ "/research-reports/generate-all",
577
+ "/research-reports/retry",
578
+ "/research-reports/workflow/resume",
579
+ "/revenue/stage-docs/{lifecycle_entry_id}/{entity}/backfill",
580
+ "/scrape/requests",
581
+ "/search/companies",
582
+ "/search/companies/save",
583
+ "/search/contacts",
584
+ "/search/contacts/save",
585
+ "/seo/audits",
586
+ "/seo/keywords/research",
587
+ "/sequencer/content/email/generate",
588
+ "/sequencer/content/instructions/improve",
589
+ "/sequencer/content/linkedin/generate",
590
+ "/sequencer/templates/steps/generate",
591
+ "/social-listeners",
592
+ "/social-listeners/auto-seed/all",
593
+ "/social-listeners/auto-seed/brand",
594
+ "/social-listeners/auto-seed/competitors",
595
+ "/social-listeners/auto-seed/engagement",
596
+ "/social-listeners/auto-seed/keywords",
597
+ "/social-listeners/bulk-from-list",
598
+ "/social-listeners/integrations/x",
599
+ "/social-listeners/integrations/x/test",
600
+ "/social-listeners/posts/{post_id}/engagements/add-to-list",
601
+ "/social-listeners/posts/{post_id}/mark",
602
+ "/social-listeners/posts/{post_id}/save-contact",
603
+ "/social-listeners/queries/generate",
604
+ "/social/posts/generate",
605
+ "/tam/generate",
606
+ "/tam/regenerate",
607
+ "/tasks/{task_id}/start",
608
+ "/team-members/me/enrich-linkedin",
609
+ "/team-members/{team_member_id}/enrich-linkedin",
610
+ "/team-members/{team_member_id}/generate-post",
611
+ "/teams/auto-compose/suggest",
612
+ "/voice/agents/{agent_id}/documents/upload",
613
+ "/voice/call-flow-examples/transcribe",
614
+ "/voice/call-scripts/generate",
615
+ "/voice/campaigns/call-scripts",
616
+ "/voice/campaigns/email-enhancements",
617
+ "/voice/campaigns/email-spintax",
618
+ "/voice/campaigns/emails",
619
+ "/voice/campaigns/linkedin-messages",
620
+ "/voice/campaigns/onboarding/messages",
621
+ "/voice/campaigns/onboarding/threads/actions",
622
+ "/voice/campaigns/voicemails",
623
+ "/voice/chat-agent/messages",
624
+ "/voice/collections/{collection_id}/files/paste-text",
625
+ "/voice/collections/{collection_id}/files/upload",
626
+ "/voice/collections/{collection_id}/files/upload-multiple",
627
+ "/voice/collections/{collection_id}/reindex",
628
+ "/voice/collections/{collection_id}/scrape-sources",
629
+ "/voice/collections/{collection_id}/scrape-sources/{source_id}/run",
630
+ "/voice/email-agent/batch",
631
+ "/voice/email-agent/compose",
632
+ "/voice/email-agent/draft-reply",
633
+ "/voice/icp/queries",
634
+ "/voice/knowledge-base/files/upload",
635
+ "/voice/receptionist/messages",
636
+ "/voice/research/company",
637
+ "/voice/research/org-chart",
638
+ "/voice/research/prospect-data",
639
+ "/voice/research/prospect-profile",
640
+ "/voice/topics/classify",
641
+ "/voice/twins",
642
+ "/voice/twins/extract-linkedin",
643
+ "/voice/video-recordings/upload",
644
+ "/voice/voice-library/onboarding-voice",
645
+ "/voice/voice-library/voices",
646
+ "/voice/worksheets/calculate",
647
+ "/work/signals/promote",
648
+ "/workbench/tables/{table_id}/ai/generate-prompt",
649
+ "/workbench/tables/{table_id}/ai/groups/{group_id}/run",
650
+ "/workbench/tables/{table_id}/ai/preview",
651
+ "/workbench/tables/{table_id}/ai/run",
652
+ "/workbench/tables/{table_id}/ai/run-all",
653
+ "/workbench/tables/{table_id}/columns/{col_id}/ai/run",
654
+ "/workbench/tables/{table_id}/find-people/configure",
655
+ "/workbench/tables/{table_id}/find-people/{config_id}/run",
656
+ "/workbench/tables/{table_id}/import/search",
657
+ "/workbench/tables/{table_id}/import/search/research/preview",
658
+ "/workbench/tables/{table_id}/pipelines",
659
+ "/workbench/tables/{table_id}/scraper/providers/{provider}/runs",
660
+ "/workbench/tables/{table_id}/scraper/runs",
661
+ "/workbench/tables/{table_id}/suggest-mappings",
662
+ "/workbench/tables/{table_id}/triggers",
663
+ "/workbench/tables/{table_id}/unlock-rows",
664
+ "/workbench/tables/{table_id}/waterfall/configs/{column_id}/run"
665
+ ],
666
+ PUT: [
667
+ "/agent/operators/{operator}/enabled",
668
+ "/agent/operators/{operator}/skills/{skill_key}",
669
+ "/deliverability/autopilot/preferences",
670
+ "/enrichment/auto-enrichment/settings/{entity_type}",
671
+ "/enrichment/lists/{list_id}/pipelines/{pipeline_id}",
672
+ "/enrichment/record-sync/{entity_type}/policy",
673
+ "/enrichment/waterfall/configs/{column_id}",
674
+ "/marketplace/me/invoices/{invoice_id}",
675
+ "/marketplace/me/rates",
676
+ "/radar/settings",
677
+ "/workbench/tables/{table_id}/auto-enrich",
678
+ "/workbench/tables/{table_id}/pipelines/{pipeline_id}",
679
+ "/workbench/tables/{table_id}/schedule",
680
+ "/workbench/tables/{table_id}/triggers/{trigger_id}"
681
+ ]
682
+ };
683
+
684
+ // src/generated/external.ts
685
+ var EXTERNAL_ROUTES = {
686
+ GET: [
687
+ "/dialer/sessions/token",
688
+ "/marketplace/me/connect/dashboard-link",
689
+ "/marketplace/me/connect/onboarding-link",
690
+ "/marketplace/me/payout-account/login-link",
691
+ "/marketplace/me/payout-account/onboarding-link",
692
+ "/voice/mcp-servers/{mcp_server_id}/tools"
693
+ ],
694
+ PATCH: [
695
+ "/ad-campaigns/{campaign_id}/ads/{ad_id}",
696
+ "/appointments/bookings/{booking_uid}/location",
697
+ "/appointments/bookings/{booking_uid}/sequence",
698
+ "/appointments/workflows/{workflow_id}",
699
+ "/audience-syncs/{config_id}",
700
+ "/campaigns/{campaign_id}",
701
+ "/campaigns/{campaign_id}/full",
702
+ "/content/calendar/{content_type}/{content_id}/schedule",
703
+ "/inbox/mailboxes/bulk",
704
+ "/inbox/mailboxes/{mailbox}/settings",
705
+ "/integrations/crm/meetings/{event_id}",
706
+ "/newsletters/{newsletter_id}/subscribers/{subscriber_id}/unsubscribe",
707
+ "/quotes/{quote_id}",
708
+ "/sequences/{sequence_id}",
709
+ "/sequences/{sequence_id}/steps/{step_id}",
710
+ "/voice/dialer/sessions/{session_id}/status",
711
+ "/voice/dispositions/{disposition_id}",
712
+ "/webhooks/{webhook_id}"
713
+ ],
714
+ POST: [
715
+ "/ad-campaigns/images",
716
+ "/ad-campaigns/status-refresh",
717
+ "/ad-campaigns/{campaign_id}/ads",
718
+ "/ad-campaigns/{campaign_id}/ads/batch",
719
+ "/ad-campaigns/{campaign_id}/ads/{ad_id}/status",
720
+ "/ad-campaigns/{campaign_id}/edit-preview",
721
+ "/ad-campaigns/{campaign_id}/retry",
722
+ "/ad-campaigns/{campaign_id}/status-refresh",
723
+ "/appointments/bookings",
724
+ "/appointments/bookings/import",
725
+ "/appointments/bookings/{booking_uid}/confirm",
726
+ "/appointments/bookings/{booking_uid}/guests",
727
+ "/appointments/bookings/{booking_uid}/mark-absent",
728
+ "/appointments/bookings/{booking_uid}/notes",
729
+ "/appointments/bookings/{booking_uid}/request-reschedule",
730
+ "/appointments/bookings/{booking_uid}/reschedule",
731
+ "/appointments/calendars/selected",
732
+ "/appointments/conferencing/connect/{provider}",
733
+ "/appointments/conferencing/{provider}/default",
734
+ "/appointments/workflows",
735
+ "/appointments/workflows/{workflow_id}/toggle",
736
+ "/audience-syncs",
737
+ "/audience-syncs/google/conversion-actions",
738
+ "/audience-syncs/google/conversions",
739
+ "/audience-syncs/google/video-assets/library",
740
+ "/audience-syncs/google/video-assets/links",
741
+ "/audience-syncs/google/video-assets/upload-urls",
742
+ "/audience-syncs/google/video-assets/uploads",
743
+ "/audience-syncs/{config_id}/launch",
744
+ "/audience-syncs/{config_id}/trigger",
745
+ "/campaigns",
746
+ "/campaigns/{campaign_id}/ad-images/{image_id}/hide",
747
+ "/campaigns/{campaign_id}/documents",
748
+ "/campaigns/{campaign_id}/launch",
749
+ "/campaigns/{campaign_id}/sequence/steps",
750
+ "/content/calendar/{content_type}/{content_id}/retry-publish",
751
+ "/crm-syncs/{provider}/companies/push",
752
+ "/crm-syncs/{provider}/contacts/push",
753
+ "/crm-syncs/{provider}/lists/push",
754
+ "/customer-success/companies/{company_id}/sync",
755
+ "/desk/accounts/{account_id}/committee/plays/{action_id}/run",
756
+ "/desk/accounts/{account_id}/committee/{contact_id}/linkedin-invite",
757
+ "/desk/decisions/{decision_id}/plays/{action_id}/run",
758
+ "/desk/decisions/{decision_id}/send-reply",
759
+ "/desk/decisions/{decision_id}/send-sms",
760
+ "/desk/plays/approvals/{execution_id}/decide",
761
+ "/dialer/parallel-calls/calls/{livekit_room_name}/drop-voicemail",
762
+ "/dialer/parallel-calls/manual-dial",
763
+ "/dialer/parallel-calls/redial-contact",
764
+ "/dialer/parallel-calls/sessions/start",
765
+ "/dialer/sessions/calls/drop-voicemail",
766
+ "/dialer/sessions/{session_id}/next-batch",
767
+ "/envelopes/{envelope_id}/resend",
768
+ "/envelopes/{envelope_id}/send",
769
+ "/feedback/sending-domains/verify",
770
+ "/feedback/surveys/{survey_id}/send",
771
+ "/forms/deliveries/{receipt_id}/retry",
772
+ "/forms/{form_key}/backfills",
773
+ "/forms/{form_key}/delivery/pause",
774
+ "/forms/{form_key}/delivery/resume",
775
+ "/inbox/emails/compose",
776
+ "/inbox/emails/{email_id}/send",
777
+ "/inbox/linkedin/accounts/sync",
778
+ "/inbox/linkedin/accounts/{account_id}/enable",
779
+ "/inbox/linkedin/compose",
780
+ "/inbox/mailboxes/activate",
781
+ "/inbox/mailboxes/{mailbox}/sync",
782
+ "/inbox/sms/compose",
783
+ "/inbox/{reply_id}/assign",
784
+ "/inbox/{reply_id}/send",
785
+ "/inbox/{reply_id}/tag",
786
+ "/integrations/connections",
787
+ "/integrations/connections/session-token",
788
+ "/integrations/crm-sync/audiences",
789
+ "/integrations/crm-sync/contacts/pull",
790
+ "/integrations/crm-sync/contacts/push",
791
+ "/integrations/crm-sync/deals/pull",
792
+ "/integrations/crm-sync/deals/push",
793
+ "/integrations/crm-sync/leads/previews",
794
+ "/integrations/crm-sync/leads/pull",
795
+ "/integrations/crm-sync/leads/push",
796
+ "/integrations/crm-sync/pull",
797
+ "/integrations/crm-sync/push",
798
+ "/integrations/crm/connections/{connection_id}/batch/contacts",
799
+ "/integrations/crm/connections/{connection_id}/companies",
800
+ "/integrations/crm/connections/{connection_id}/contacts",
801
+ "/integrations/crm/connections/{connection_id}/deals",
802
+ "/integrations/crm/connections/{connection_id}/leads",
803
+ "/integrations/crm/lists",
804
+ "/integrations/crm/lists/memberships",
805
+ "/integrations/crm/meetings",
806
+ "/integrations/linkedin-outreach/campaigns/{campaign_id}/pause",
807
+ "/integrations/linkedin-outreach/campaigns/{campaign_id}/resume",
808
+ "/integrations/linkedin-outreach/connection/reconnect",
809
+ "/integrations/linkedin-outreach/lists",
810
+ "/integrations/linkedin-outreach/lists/{list_id}/leads",
811
+ "/integrations/linkedin-outreach/workspaces/sync",
812
+ "/integrations/migrations/delta-sync",
813
+ "/integrations/migrations/discovery",
814
+ "/integrations/migrations/{migration_id}/confirm",
815
+ "/integrations/sugarcrm/connect",
816
+ "/integrations/sugarcrm/reconnect",
817
+ "/landing-pages/{landing_page_id}/publish",
818
+ "/landing-pages/{landing_page_id}/unpublish",
819
+ "/linkedin/accounts/sync",
820
+ "/marketplace/agencies/{slug}/reps/{sdr_id}/publish",
821
+ "/marketplace/me/messages/{conversation_id}/reply",
822
+ "/marketplace/me/payout-account/bank-details",
823
+ "/marketplace/me/payout-account/methods",
824
+ "/marketplace/me/payout-account/setup",
825
+ "/marketplace/me/sync-workbench",
826
+ "/marketplace/talent/{sdr_id}/messages",
827
+ "/marketplace/talent/{sdr_id}/request",
828
+ "/newsletters",
829
+ "/newsletters/{newsletter_id}/activate",
830
+ "/newsletters/{newsletter_id}/issues",
831
+ "/newsletters/{newsletter_id}/issues/{issue_id}/duplicate",
832
+ "/newsletters/{newsletter_id}/issues/{issue_id}/send",
833
+ "/newsletters/{newsletter_id}/issues/{issue_id}/send-test",
834
+ "/newsletters/{newsletter_id}/issues/{issue_id}/send/resume",
835
+ "/newsletters/{newsletter_id}/resume",
836
+ "/newsletters/{newsletter_id}/settings/verify-domain",
837
+ "/newsletters/{newsletter_id}/subscribers",
838
+ "/nurtures/{nurture_id}/launch",
839
+ "/org/sso/sync",
840
+ "/phone-numbers/a2p/register",
841
+ "/profile/deal-automations/sync-now",
842
+ "/programmatic-campaigns/{campaign_id}/pages/actions",
843
+ "/programmatic-campaigns/{campaign_id}/pages/{page_id}/actions",
844
+ "/provider-domains/{domain_id}/forwarding",
845
+ "/provider-domains/{domain_id}/mailbox-profile-picture",
846
+ "/provider-domains/{domain_id}/regenerate-nameservers",
847
+ "/provider-domains/{domain_id}/resend-transfer-password",
848
+ "/provider-domains/{domain_id}/resend-verification",
849
+ "/provider-domains/{domain_id}/set-nameservers",
850
+ "/provider-usage/refresh",
851
+ "/provider-usage/sync",
852
+ "/quote-billing-contact",
853
+ "/quote-contacts",
854
+ "/quote-settings/documents",
855
+ "/quote-templates",
856
+ "/quotes",
857
+ "/quotes/batch",
858
+ "/quotes/{quote_id}/duplicate",
859
+ "/quotes/{quote_id}/edit-as-draft",
860
+ "/quotes/{quote_id}/mark-accepted",
861
+ "/quotes/{quote_id}/send",
862
+ "/quotes/{quote_id}/unarchive",
863
+ "/radar/alerts/dispatch",
864
+ "/repos/{repo_id}/campaigns/{campaign_id}/launch",
865
+ "/sales-coach/interviews/{interview_id}/members",
866
+ "/sales-coach/interviews/{interview_id}/members/{member_id}/send-invite",
867
+ "/sequencer/content/voice/test-call",
868
+ "/sequences",
869
+ "/sequences/generate-spintax",
870
+ "/sequences/{sequence_id}/contacts",
871
+ "/sequences/{sequence_id}/contacts/{contact_id}/resume",
872
+ "/sequences/{sequence_id}/pause",
873
+ "/sequences/{sequence_id}/resume",
874
+ "/sequences/{sequence_id}/run",
875
+ "/sequences/{sequence_id}/sync",
876
+ "/settings/scrape-config/crawl",
877
+ "/skills/{action_id}/execute",
878
+ "/skills/{action_id}/test-runs",
879
+ "/social-listeners/posts/{post_id}/add-to-sequence",
880
+ "/social/posts/{post_id}/engagers/add-to-audience",
881
+ "/social/posts/{post_id}/engagers/enroll",
882
+ "/social/posts/{post_id}/publish",
883
+ "/social/posts/{post_id}/schedule",
884
+ "/stripe/api-key",
885
+ "/stripe/sync",
886
+ "/team-members/sync",
887
+ "/voice/calls",
888
+ "/voice/dialer/sessions",
889
+ "/voice/dialer/sessions/{session_id}/resume",
890
+ "/voice/dispositions",
891
+ "/voice/inbound-calls/decline",
892
+ "/voice/inbound-calls/dialer/{call_id}/decline",
893
+ "/voice/inbound-calls/{room_name}/claim",
894
+ "/voice/mcp-servers/{mcp_server_id}/test",
895
+ "/webhooks",
896
+ "/webhooks/{webhook_id}/rotate-secret",
897
+ "/website-editor/publish",
898
+ "/website-editor/sync",
899
+ "/workbench/scraper/providers/{provider}/connection/test",
900
+ "/workbench/tables/{table_id}/import/crm",
901
+ "/workbench/tables/{table_id}/send-to-sequence",
902
+ "/workflows",
903
+ "/workflows/executions/approve",
904
+ "/workflows/executions/bulk-restart",
905
+ "/workflows/executions/request-changes",
906
+ "/workflows/executions/{execution_id}/pause",
907
+ "/workflows/executions/{execution_id}/restart",
908
+ "/workflows/executions/{execution_id}/resume",
909
+ "/workflows/executions/{execution_id}/stop",
910
+ "/workflows/integrations/{provider_name}/test",
911
+ "/workflows/validate",
912
+ "/workflows/workbenches",
913
+ "/workflows/{action_id}/execute",
914
+ "/workflows/{action_id}/trigger-reset"
915
+ ],
916
+ PUT: [
917
+ "/ad-campaigns/{campaign_id}",
918
+ "/appointments/calendars/destination",
919
+ "/appointments/conferencing/{provider}/link",
920
+ "/campaigns/{campaign_id}/audience",
921
+ "/campaigns/{campaign_id}/documents/{document_id}",
922
+ "/campaigns/{campaign_id}/sequence",
923
+ "/campaigns/{campaign_id}/sequence/steps/{step_id}",
924
+ "/desk/autonomy",
925
+ "/desk/org-settings",
926
+ "/inbox/linkedin/accounts/{account_id}",
927
+ "/integrations/crm-sync/pull-enabled",
928
+ "/integrations/crm-sync/push-enabled",
929
+ "/integrations/crm/connections/{connection_id}/batch/contacts",
930
+ "/integrations/crm/connections/{connection_id}/companies/{company_id}",
931
+ "/integrations/crm/connections/{connection_id}/contacts/{contact_id}",
932
+ "/integrations/crm/connections/{connection_id}/deals/{deal_id}",
933
+ "/integrations/crm/connections/{connection_id}/leads/{lead_id}",
934
+ "/integrations/linkedin-outreach/workspaces/active",
935
+ "/linkedin/accounts/{account_id}/schedule",
936
+ "/newsletters/{newsletter_id}/issues/{issue_id}",
937
+ "/quote-settings",
938
+ "/quote-templates/{template_id}",
939
+ "/quotes/{quote_id}",
940
+ "/sms/phone-numbers/{phone_number}",
941
+ "/social/autopilot/{account_id}",
942
+ "/workflows/{action_id}"
943
+ ]
944
+ };
945
+
290
946
  // src/http.ts
291
947
  var G8Error = class _G8Error extends Error {
292
948
  constructor(args) {
@@ -304,9 +960,70 @@ var G8Error = class _G8Error extends Error {
304
960
  function isRetryableStatus(status) {
305
961
  return status === 429 || status >= 500 && status <= 599;
306
962
  }
307
- function isNonIdempotentMethod(method) {
963
+ function isWriteMethod(method) {
308
964
  const m = method.toUpperCase();
309
- return m === "POST" || m === "PATCH";
965
+ return m === "POST" || m === "PUT" || m === "PATCH" || m === "DELETE";
966
+ }
967
+ var API_BASE_SEGMENT = "/api/v1";
968
+ var billableMatchers = null;
969
+ var externalMatchers = null;
970
+ function templateToRegexSource(template) {
971
+ return template.split(/(\{[^}/]+\})/).map((part) => /^\{[^}/]+\}$/.test(part) ? "[^/]+" : part.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("");
972
+ }
973
+ function buildMatchers(routes) {
974
+ const out = /* @__PURE__ */ new Map();
975
+ for (const [m, templates] of Object.entries(routes)) {
976
+ if (!templates.length) continue;
977
+ out.set(m, new RegExp(`^(?:${templates.map(templateToRegexSource).join("|")})/?$`));
978
+ }
979
+ return out;
980
+ }
981
+ function matcherFor(method) {
982
+ if (!billableMatchers) billableMatchers = buildMatchers(BILLABLE_ROUTES);
983
+ return billableMatchers.get(method.toUpperCase());
984
+ }
985
+ function externalMatcherFor(method) {
986
+ if (!externalMatchers) externalMatchers = buildMatchers(EXTERNAL_ROUTES);
987
+ return externalMatchers.get(method.toUpperCase());
988
+ }
989
+ function apiRelativePath(urlOrPath) {
990
+ let p = urlOrPath.replace(/^[a-zA-Z][a-zA-Z0-9+.-]*:\/\/[^/]*/, "");
991
+ p = p.split(/[?#]/, 1)[0];
992
+ const at = p.indexOf(API_BASE_SEGMENT + "/");
993
+ if (at < 0) return null;
994
+ return p.slice(at + API_BASE_SEGMENT.length);
995
+ }
996
+ function isBillableOperation(method, urlOrPath) {
997
+ const matcher = matcherFor(method);
998
+ if (!matcher) return false;
999
+ const p = apiRelativePath(urlOrPath);
1000
+ return p != null && matcher.test(p);
1001
+ }
1002
+ function isExternalOperation(method, urlOrPath) {
1003
+ const matcher = externalMatcherFor(method);
1004
+ if (!matcher) return false;
1005
+ const p = apiRelativePath(urlOrPath);
1006
+ return p != null && matcher.test(p);
1007
+ }
1008
+ function isNoBlindRetryOperation(method, urlOrPath) {
1009
+ return isBillableOperation(method, urlOrPath) || isExternalOperation(method, urlOrPath);
1010
+ }
1011
+ var PRE_SEND_ERROR_CODES = /* @__PURE__ */ new Set([
1012
+ "ECONNREFUSED",
1013
+ "ENOTFOUND",
1014
+ "EAI_AGAIN",
1015
+ "ENETUNREACH",
1016
+ "EHOSTUNREACH",
1017
+ "UND_ERR_CONNECT_TIMEOUT"
1018
+ ]);
1019
+ function isPreSendNetworkError(err) {
1020
+ let cur = err;
1021
+ for (let depth = 0; cur && depth < 4; depth++) {
1022
+ if (typeof cur.code === "string" && PRE_SEND_ERROR_CODES.has(cur.code)) return true;
1023
+ if (Array.isArray(cur.errors) && cur.errors.some((e) => isPreSendNetworkError(e))) return true;
1024
+ cur = cur.cause;
1025
+ }
1026
+ return false;
310
1027
  }
311
1028
  function newIdempotencyKey() {
312
1029
  const c = globalThis.crypto;
@@ -344,7 +1061,7 @@ function buildQuery(query) {
344
1061
  const s = qs.toString();
345
1062
  return s ? `?${s}` : "";
346
1063
  }
347
- async function toG8Error(resp) {
1064
+ async function toG8Error(resp, retryable = isRetryableStatus(resp.status)) {
348
1065
  let body = void 0;
349
1066
  try {
350
1067
  const text = await resp.text();
@@ -361,9 +1078,36 @@ async function toG8Error(resp) {
361
1078
  code: typeof env.code === "string" ? env.code : String(resp.status),
362
1079
  requestId: typeof env.request_id === "string" && env.request_id || resp.headers.get("x-request-id") || void 0,
363
1080
  detail: env.detail,
364
- retryable: isRetryableStatus(resp.status)
1081
+ retryable
365
1082
  });
366
1083
  }
1084
+ var TARGET_ORG_HEADER = "x-target-org-id";
1085
+ var nonAgencyKeys = /* @__PURE__ */ new Set();
1086
+ var warnedTargetOrgKeys = /* @__PURE__ */ new Set();
1087
+ function keyFingerprint(apiKey) {
1088
+ let h = 2166136261;
1089
+ for (let i = 0; i < apiKey.length; i++) {
1090
+ h ^= apiKey.charCodeAt(i);
1091
+ h = Math.imul(h, 16777619) >>> 0;
1092
+ }
1093
+ return `${apiKey.length}:${h.toString(36)}`;
1094
+ }
1095
+ function noteAgencyStatus(apiKey, isAgency) {
1096
+ const fp = keyFingerprint(apiKey);
1097
+ if (isAgency) nonAgencyKeys.delete(fp);
1098
+ else nonAgencyKeys.add(fp);
1099
+ }
1100
+ function warnIfTargetOrgIgnored(apiKey, headers) {
1101
+ if (!Object.keys(headers).some((h) => h.toLowerCase() === TARGET_ORG_HEADER)) return;
1102
+ const fp = keyFingerprint(apiKey);
1103
+ if (!nonAgencyKeys.has(fp) || warnedTargetOrgKeys.has(fp)) return;
1104
+ warnedTargetOrgKeys.add(fp);
1105
+ if (typeof console !== "undefined" && typeof console.warn === "function") {
1106
+ console.warn(
1107
+ "[@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."
1108
+ );
1109
+ }
1110
+ }
367
1111
  async function request(baseUrl, path, apiKey, opts = {}) {
368
1112
  const {
369
1113
  method = "GET",
@@ -383,8 +1127,10 @@ async function request(baseUrl, path, apiKey, opts = {}) {
383
1127
  Authorization: `Bearer ${apiKey}`,
384
1128
  ...headers
385
1129
  };
386
- const effectiveIdempotencyKey = idempotencyKey ?? (maxRetries > 0 && isNonIdempotentMethod(method) ? newIdempotencyKey() : void 0);
1130
+ warnIfTargetOrgIgnored(apiKey, headers);
1131
+ const effectiveIdempotencyKey = idempotencyKey ?? (maxRetries > 0 && isWriteMethod(method) ? newIdempotencyKey() : void 0);
387
1132
  if (effectiveIdempotencyKey) finalHeaders["Idempotency-Key"] = effectiveIdempotencyKey;
1133
+ const billable = isNoBlindRetryOperation(method, url);
388
1134
  let attempt = 0;
389
1135
  for (; ; ) {
390
1136
  let resp;
@@ -396,7 +1142,8 @@ async function request(baseUrl, path, apiKey, opts = {}) {
396
1142
  signal
397
1143
  });
398
1144
  } catch (err) {
399
- if (attempt < maxRetries) {
1145
+ const safeToRetry = !billable || isPreSendNetworkError(err);
1146
+ if (attempt < maxRetries && safeToRetry) {
400
1147
  await sleepImpl(backoffDelayMs(attempt, retryBaseMs));
401
1148
  attempt++;
402
1149
  continue;
@@ -405,21 +1152,22 @@ async function request(baseUrl, path, apiKey, opts = {}) {
405
1152
  message: `Network error: ${err?.message ?? "request failed"}`,
406
1153
  status: 0,
407
1154
  type: "network_error",
408
- retryable: true
1155
+ retryable: safeToRetry
409
1156
  });
410
1157
  }
411
1158
  if (resp.ok) {
412
1159
  const text = await resp.text();
413
1160
  return text ? JSON.parse(text) : void 0;
414
1161
  }
415
- if (isRetryableStatus(resp.status) && attempt < maxRetries) {
1162
+ const statusRetryable = isRetryableStatus(resp.status) && (!billable || resp.status === 429);
1163
+ if (statusRetryable && attempt < maxRetries) {
416
1164
  const retryAfter = parseRetryAfter(resp.headers.get("retry-after"));
417
1165
  const delay = retryAfter != null ? retryAfter : backoffDelayMs(attempt, retryBaseMs);
418
1166
  await sleepImpl(delay);
419
1167
  attempt++;
420
1168
  continue;
421
1169
  }
422
- throw await toG8Error(resp);
1170
+ throw await toG8Error(resp, billable ? statusRetryable : isRetryableStatus(resp.status));
423
1171
  }
424
1172
  }
425
1173
  async function* paginate(fetchPage) {
@@ -648,30 +1396,74 @@ var createCampaignsClient = (apiKey, apiUrl) => {
648
1396
 
649
1397
  // src/signals.ts
650
1398
  var DEFAULT_API9 = "https://be.graph8.com";
1399
+ 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.";
1400
+ function explainSignalsError(err) {
1401
+ if (err instanceof G8Error && err.status === 403) {
1402
+ throw new G8Error({
1403
+ message: `${INTENT_READ_HINT} (server said: ${err.message})`,
1404
+ status: err.status,
1405
+ type: err.type,
1406
+ code: err.code,
1407
+ requestId: err.requestId,
1408
+ detail: err.detail,
1409
+ retryable: false
1410
+ });
1411
+ }
1412
+ throw err;
1413
+ }
651
1414
  var createSignalsClient = (key, isApiKey, apiUrl) => {
652
1415
  const baseUrl = apiUrl || DEFAULT_API9;
653
1416
  const headers = () => isApiKey ? { "Content-Type": "application/json", "Authorization": `Bearer ${key}` } : { "Content-Type": "application/json", "X-Write-Key": key };
654
1417
  const endpoint = "/api/v1/public/signals/company";
655
1418
  return {
656
- /** Get intent signals for a specific company domain. */
1419
+ /**
1420
+ * Get intent signals for a specific company domain.
1421
+ *
1422
+ * With an API key this throws a `G8Error` on any failure; a 403 means the
1423
+ * key lacks the `intent:read` scope. With a write key only, a failure still
1424
+ * resolves to an all-zeros result (legacy browser behaviour).
1425
+ */
657
1426
  async company(domain) {
1427
+ if (isApiKey) {
1428
+ const body = await request(baseUrl, endpoint, key, {
1429
+ query: { domain }
1430
+ }).catch(explainSignalsError);
1431
+ return body?.data || body;
1432
+ }
658
1433
  const resp = await fetch(`${baseUrl}${endpoint}?domain=${encodeURIComponent(domain)}`, { headers: headers() });
659
1434
  if (!resp.ok) return { domain, score: 0, intent: "low", signals: [], last_seen: null };
660
1435
  const data = await resp.json();
661
1436
  return data.data || data;
662
1437
  },
663
- /** Stream intent signals - calls callback every 30s with latest data. */
1438
+ /**
1439
+ * Stream intent signals - calls callback every 30s with latest data.
1440
+ *
1441
+ * A failed poll is skipped. An auth failure (401/403) cannot fix itself by
1442
+ * waiting, so it stops the stream and is logged once instead of polling a
1443
+ * forbidden route every 30s forever.
1444
+ */
664
1445
  stream(domains, callback) {
1446
+ let interval;
1447
+ let stopped = false;
1448
+ const stop = () => {
1449
+ stopped = true;
1450
+ if (interval !== void 0) clearInterval(interval);
1451
+ };
665
1452
  const check = async () => {
666
1453
  try {
667
1454
  const results = await Promise.all(domains.map((d) => this.company(d)));
668
- callback(results);
669
- } catch {
1455
+ if (!stopped) callback(results);
1456
+ } catch (err) {
1457
+ if (err instanceof G8Error && (err.status === 401 || err.status === 403)) {
1458
+ stop();
1459
+ if (typeof console !== "undefined") console.warn(`[@graph8/sdk] signals.stream stopped: ${err.message}`);
1460
+ }
670
1461
  }
671
1462
  };
672
1463
  check();
673
- const interval = setInterval(check, 3e4);
674
- return () => clearInterval(interval);
1464
+ interval = setInterval(check, 3e4);
1465
+ if (stopped) clearInterval(interval);
1466
+ return stop;
675
1467
  }
676
1468
  };
677
1469
  };
@@ -713,8 +1505,14 @@ var createVoiceClient = (apiKey, apiUrl) => {
713
1505
  return resp.data ?? resp;
714
1506
  },
715
1507
  /**
716
- * Resume a PAUSED dialer session. Auto-fetches the next batch from the source list,
717
- * filters already-called + phoneless rows, and forwards to voice's start-session.
1508
+ * Resume a PAUSED dialer session.
1509
+ *
1510
+ * @deprecated The server route is retired and answers 410 (it never dialed:
1511
+ * it forwarded to a voice path that did not exist, and the LiveKit dialer it
1512
+ * targeted has been removed). Resume with
1513
+ * `g8.api.call("dial_next_batch_dialer_sessions__session_id__next_batch_post",
1514
+ * { path: { session_id }, body: { resume_intent: true } })`; the rep must have
1515
+ * the dialer open to take the calls.
718
1516
  * @param maxContacts 1-4 (voice caps parallel dialing at 4). Default 4.
719
1517
  */
720
1518
  async resumeSession(sessionId, maxContacts = 4) {
@@ -868,7 +1666,61 @@ var KNOWN_WEBHOOK_EVENTS = [
868
1666
  "crm.record.created",
869
1667
  "crm.record.updated",
870
1668
  "crm.record.archived",
871
- "crm.record.restored"
1669
+ "crm.record.restored",
1670
+ "sequence.contact_enrolled",
1671
+ "sequence.contact_removed",
1672
+ "sequence.step_completed",
1673
+ "sequence.step_failed",
1674
+ "engagement.contact_unsubscribed",
1675
+ "engagement.sms_delivered",
1676
+ "engagement.sms_failed",
1677
+ "engagement.whatsapp_delivered",
1678
+ "engagement.whatsapp_failed",
1679
+ "engagement.call_started",
1680
+ "engagement.call_completed",
1681
+ "engagement.call_disposition_set",
1682
+ "engagement.voicemail_detected",
1683
+ "engagement.voicemail_left",
1684
+ "engagement.email_clicked",
1685
+ "engagement.link_clicked",
1686
+ "engagement.call_recording_ready",
1687
+ "meeting.no_show",
1688
+ "voice_ai.call_started",
1689
+ "voice_ai.call_completed",
1690
+ "voice_ai.voicemail_left",
1691
+ "deal.created",
1692
+ "deal.updated",
1693
+ "deal.stage_changed",
1694
+ "deal.deleted",
1695
+ "quote.created",
1696
+ "quote.updated",
1697
+ "quote.sent",
1698
+ "quote.resent",
1699
+ "quote.resend_failed",
1700
+ "quote.link_generated",
1701
+ "quote.viewed",
1702
+ "quote.accepted",
1703
+ "quote.declined",
1704
+ "quote.expired",
1705
+ "quote.voided",
1706
+ "quote.superseded",
1707
+ "quote.archived",
1708
+ "quote.unarchived",
1709
+ "quote.payment_received",
1710
+ "quote.payment_failed",
1711
+ "quote.subscription_canceled",
1712
+ "quote.provisioned",
1713
+ "form.submitted",
1714
+ "visitor.identified",
1715
+ "intent.signal",
1716
+ "task.created",
1717
+ "task.updated",
1718
+ "task.completed",
1719
+ "task.deleted",
1720
+ "enrichment.job_completed",
1721
+ "enrichment.job_failed",
1722
+ "workflow.execution_completed",
1723
+ "workflow.execution_failed"
872
1724
  ];
873
1725
  var WebhookSignatureError = class extends Error {
874
1726
  constructor(message) {
@@ -3203,6 +4055,7 @@ var API_OPERATIONS = {
3203
4055
  list_onboarding_threads_voice_campaigns_onboarding_threads_get: ["GET", "/voice/campaigns/onboarding/threads", "voice", "listOnboardingThreads", "read", "voice:read"],
3204
4056
  list_ooo_appointments_out_of_office_get: ["GET", "/appointments/out-of-office", "appointments", "listOoo", "read", "meetings:read"],
3205
4057
  list_opportunities_radar_opportunities_get: ["GET", "/radar/opportunities", "radar", "listOpportunities", "read", "radar:read"],
4058
+ list_org_events_events_get: ["GET", "/events", "events", "listOrgEvents", "read", "analytics:read"],
3206
4059
  list_org_marketplace_hirings_marketplace_org_hirings_get: ["GET", "/marketplace/org/hirings", "marketplace", "listOrgMarketplaceHirings", "read", "marketplace:read"],
3207
4060
  list_org_marketplace_invoices_marketplace_org_invoices_get: ["GET", "/marketplace/org/invoices", "marketplace", "listOrgMarketplaceInvoices", "read", "marketplace:read"],
3208
4061
  list_org_marketplace_meetings_marketplace_org_meetings_get: ["GET", "/marketplace/org/meetings", "marketplace", "listOrgMarketplaceMeetings", "read", "marketplace:read"],
@@ -6019,17 +6872,35 @@ var createSearchClient = (apiKey, apiUrl) => {
6019
6872
 
6020
6873
  // src/agency.ts
6021
6874
  var DEFAULT_API35 = "https://be.graph8.com";
6875
+ function mentionsAgencyRequirement(err) {
6876
+ const text = `${err.message} ${typeof err.detail === "string" ? err.detail : JSON.stringify(err.detail ?? "")}`;
6877
+ return /agency-scoped/i.test(text);
6878
+ }
6022
6879
  var createAgencyClient = (apiKey, apiUrl) => {
6023
6880
  const baseUrl = apiUrl || DEFAULT_API35;
6881
+ const recordingAgencyStatus = async (call) => {
6882
+ try {
6883
+ return await call();
6884
+ } catch (err) {
6885
+ if (err instanceof G8Error && err.status === 403 && mentionsAgencyRequirement(err)) {
6886
+ noteAgencyStatus(apiKey, false);
6887
+ }
6888
+ throw err;
6889
+ }
6890
+ };
6024
6891
  return {
6025
6892
  /** Describe the agency credential: agency org + authorized client count. */
6026
6893
  async me() {
6027
- const resp = await request(baseUrl, "/api/v1/agency/me", apiKey);
6028
- return resp.data ?? resp;
6894
+ const resp = await recordingAgencyStatus(
6895
+ () => request(baseUrl, "/api/v1/agency/me", apiKey)
6896
+ );
6897
+ const info = resp.data ?? resp;
6898
+ if (typeof info?.is_agency === "boolean") noteAgencyStatus(apiKey, info.is_agency);
6899
+ return info;
6029
6900
  },
6030
6901
  /** List the client orgs this agency key may target via `X-Target-Org-Id`. */
6031
6902
  async clients() {
6032
- return request(baseUrl, "/api/v1/agency/clients", apiKey);
6903
+ return recordingAgencyStatus(() => request(baseUrl, "/api/v1/agency/clients", apiKey));
6033
6904
  }
6034
6905
  };
6035
6906
  };