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