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