@leadpoet/client 0.1.4 → 0.1.5
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 +50 -13
- package/cli.js +46 -2
- package/cli.js.map +2 -2
- package/client.js +47 -2
- package/client.js.map +2 -2
- package/mcp.js +3969 -71
- package/mcp.js.map +4 -4
- package/package.json +13 -2
- package/skill/SKILL.md +73 -6
- package/types/scripts/leadpoet-mcp.d.ts +1 -7
- package/types/shared/account-monitoring.d.ts +1169 -0
- package/types/shared/assistant-brief.d.ts +1681 -0
- package/types/shared/assistant-memories.d.ts +62 -0
- package/types/shared/assistant-send-forecast.d.ts +442 -0
- package/types/shared/assistant.d.ts +238 -0
- package/types/shared/employee-count.d.ts +90 -0
- package/types/shared/gtm-context.d.ts +233 -0
- package/types/shared/icp-product-selection.d.ts +27 -0
- package/types/shared/icp-profile.d.ts +2625 -0
- package/types/shared/industry-taxonomy.d.ts +1 -0
- package/types/shared/lead-request-limits.d.ts +4 -0
- package/types/shared/leadpoet-client.d.ts +1315 -0
- package/types/shared/leadpoet-mcp-server.d.ts +39 -0
- package/types/shared/mcp-connect.d.ts +22 -0
- package/types/shared/monitor-technologies.d.ts +38 -0
- package/types/shared/outreach-analytics.d.ts +334 -0
- package/types/shared/outreach-audience-filters.d.ts +156 -0
- package/types/shared/outreach-audience-segments.d.ts +135 -0
- package/types/shared/outreach-enums.d.ts +22 -0
- package/types/shared/outreach-v2-contract.d.ts +253 -0
- package/types/shared/plan-entitlements.d.ts +75 -0
- package/types/shared/plan-features.d.ts +50 -0
- package/types/shared/request-credit-constants.d.ts +13 -0
- package/types/shared/website-fact-language.d.ts +9 -0
- package/types/shared/workspace-operations.d.ts +1975 -29
- package/types/shared/workspace-tool-metadata.d.ts +1083 -0
package/client.js
CHANGED
|
@@ -10,11 +10,21 @@ var WORKSPACE_OPERATIONS = [
|
|
|
10
10
|
{ "method": "patch", "nativePath": "/api/company-pipeline/cards/:id", "path": "/pipeline/companies/:id", "id": "updateCompany", "scope": "pipeline:write", "group": "workspace", "retry": "state" },
|
|
11
11
|
{ "method": "get", "nativePath": "/api/company-pipeline/contact-enrichment/readiness", "path": "/pipeline/contact-enrichment/readiness", "id": "getContactReadiness", "scope": "pipeline:read", "group": "workspace", "retry": "none" },
|
|
12
12
|
{ "method": "post", "nativePath": "/api/company-pipeline/cards/:id/contact-requests", "path": "/pipeline/companies/:id/contact-requests", "id": "requestContacts", "scope": "pipeline:write", "group": "workspace", "retry": "header" },
|
|
13
|
+
{ "method": "post", "nativePath": "/api/company-pipeline/leads/:id/contact-enrichment", "path": "/pipeline/contacts/:id/enrich", "id": "enrichContact", "scope": "pipeline:write", "group": "workspace", "retry": "header" },
|
|
14
|
+
{ "method": "post", "nativePath": "/api/pipeline/find-person", "path": "/people/find", "id": "findPerson", "scope": "pipeline:write", "group": "workspace", "retry": "header" },
|
|
15
|
+
{ "method": "get", "nativePath": "/api/pipeline/contacts/lookup", "path": "/pipeline/contacts/lookup", "id": "lookupContact", "scope": "pipeline:read", "additionalScopes": ["outreach:read"], "group": "workspace", "retry": "none" },
|
|
16
|
+
{ "method": "post", "nativePath": "/api/pipeline/leads", "path": "/pipeline/contacts", "id": "addContact", "scope": "pipeline:write", "group": "workspace", "retry": "header_uuid" },
|
|
13
17
|
{ "method": "get", "nativePath": "/api/company-pipeline/cards/:cardId/contact-requests/:requestId", "path": "/pipeline/companies/:cardId/contact-requests/:requestId", "id": "getContactRequest", "scope": "pipeline:read", "group": "workspace", "retry": "none" },
|
|
14
18
|
{ "method": "get", "nativePath": "/api/company-pipeline/cards/:cardId/contact-requests/latest", "path": "/pipeline/companies/:cardId/contact-requests/latest", "id": "getLatestContactRequest", "scope": "pipeline:read", "group": "workspace", "retry": "none" },
|
|
19
|
+
{ "method": "get", "nativePath": "/api/account-monitoring/alert-groups", "path": "/signals", "id": "listSignals", "scope": "pipeline:read", "group": "workspace", "retry": "none" },
|
|
20
|
+
{ "method": "get", "nativePath": "/api/account-monitoring/accounts/:cardId", "path": "/signals/accounts/:cardId", "id": "getAccountWatch", "scope": "pipeline:read", "group": "workspace", "retry": "none" },
|
|
21
|
+
{ "method": "post", "nativePath": "/api/account-monitoring/accounts/watch", "path": "/signals/watch", "id": "watchAccounts", "scope": "pipeline:write", "group": "workspace", "retry": "state" },
|
|
22
|
+
{ "method": "post", "nativePath": "/api/account-monitoring/monitors/status", "path": "/signals/watch-status", "id": "setWatchStatus", "scope": "pipeline:write", "group": "workspace", "retry": "state" },
|
|
23
|
+
{ "method": "post", "nativePath": "/api/account-monitoring/events/state", "path": "/signals/state", "id": "markSignals", "scope": "pipeline:write", "group": "workspace", "retry": "state" },
|
|
15
24
|
{ "method": "get", "nativePath": "/api/icp-profiles", "path": "/icps", "id": "listIcps", "scope": "lead_engine:read", "group": "workspace", "retry": "none" },
|
|
16
25
|
{ "method": "post", "nativePath": "/api/icp-profiles/audiences", "path": "/icps/audiences", "id": "createIcp", "scope": "lead_engine:write", "group": "workspace", "retry": "header" },
|
|
17
26
|
{ "method": "get", "nativePath": "/api/icp-profiles/:icpId", "path": "/icps/:icpId", "id": "getIcp", "scope": "lead_engine:read", "group": "workspace", "retry": "none" },
|
|
27
|
+
{ "method": "get", "nativePath": "/api/icp-profiles/:icpId/products", "path": "/icps/:icpId/products", "id": "listIcpProducts", "scope": "lead_engine:read", "group": "workspace", "retry": "none" },
|
|
18
28
|
{ "method": "get", "nativePath": "/api/icp-profiles/:icpId/versions", "path": "/icps/:icpId/versions", "id": "listIcpVersions", "scope": "lead_engine:read", "group": "workspace", "retry": "none" },
|
|
19
29
|
{ "method": "post", "nativePath": "/api/icp-profiles/:icpId/draft", "path": "/icps/:icpId/draft", "id": "createIcpDraft", "scope": "lead_engine:write", "group": "workspace", "retry": "none" },
|
|
20
30
|
{ "method": "patch", "nativePath": "/api/icp-profiles/:icpId/drafts/:draftId", "path": "/icps/:icpId/drafts/:draftId", "id": "updateIcpDraft", "scope": "lead_engine:write", "group": "workspace", "retry": "state" },
|
|
@@ -29,6 +39,13 @@ var WORKSPACE_OPERATIONS = [
|
|
|
29
39
|
{ "method": "patch", "nativePath": "/api/company-pipeline/deals/:dealId/stage", "path": "/pipeline/deals/:dealId/stage", "id": "moveDeal", "scope": "pipeline:write", "group": "workspace", "retry": "body" },
|
|
30
40
|
{ "method": "get", "nativePath": "/api/company-pipeline/pipeline-config", "path": "/pipeline/configuration", "id": "getPipelineConfiguration", "scope": "pipeline:read", "group": "workspace", "retry": "none" },
|
|
31
41
|
{ "method": "get", "nativePath": "/api/company-pipeline/cards/:cardId/notes", "path": "/pipeline/companies/:cardId/notes", "id": "listCompanyNotes", "scope": "pipeline:read", "group": "workspace", "retry": "none" },
|
|
42
|
+
{ "method": "get", "nativePath": "/api/company-pipeline/cards/:cardId/observations", "path": "/pipeline/companies/:cardId/observations", "id": "getCompanyObservations", "scope": "pipeline:read", "group": "workspace", "retry": "none" },
|
|
43
|
+
{ "method": "get", "nativePath": "/api/company-pipeline/cards/:cardId/fit-ratings", "path": "/pipeline/companies/:cardId/fit-ratings", "id": "listCompanyFitRatings", "scope": "pipeline:read", "group": "workspace", "retry": "none" },
|
|
44
|
+
{ "method": "post", "nativePath": "/api/company-pipeline/cards/:cardId/fit-ratings", "path": "/pipeline/companies/:cardId/fit-ratings", "id": "rateCompanyFit", "scope": "pipeline:write", "group": "workspace", "retry": "header_uuid" },
|
|
45
|
+
{ "method": "get", "nativePath": "/api/company-pipeline/icps/:icpId/fit-insights", "path": "/pipeline/icps/:icpId/fit-insights", "id": "getIcpFitInsights", "scope": "pipeline:read", "group": "workspace", "retry": "none" },
|
|
46
|
+
{ "method": "get", "nativePath": "/api/billing/credits", "path": "/billing/credits", "id": "getCreditBalance", "scope": "credits:read", "group": "workspace", "retry": "none" },
|
|
47
|
+
{ "method": "get", "nativePath": "/api/billing/credit-history", "path": "/billing/credit-history", "id": "getCreditHistory", "scope": "credits:read", "group": "workspace", "retry": "none" },
|
|
48
|
+
{ "method": "get", "nativePath": "/api/company-pipeline/deal-candidates", "path": "/pipeline/deal-candidates", "id": "listDealCandidates", "scope": "pipeline:read", "group": "workspace", "retry": "none" },
|
|
32
49
|
{ "method": "post", "nativePath": "/api/company-pipeline/cards/:cardId/notes", "path": "/pipeline/companies/:cardId/notes", "id": "createCompanyNote", "scope": "pipeline:write", "group": "workspace", "retry": "header_uuid" },
|
|
33
50
|
{ "method": "get", "nativePath": "/accounts", "path": "/outreach/accounts", "id": "listSendingAccounts", "scope": "outreach:read", "group": "outreach", "retry": "none" },
|
|
34
51
|
{ "method": "get", "nativePath": "/conversations", "path": "/outreach/conversations", "id": "listConversations", "scope": "outreach:read", "group": "outreach", "retry": "none" },
|
|
@@ -36,6 +53,7 @@ var WORKSPACE_OPERATIONS = [
|
|
|
36
53
|
{ "method": "put", "nativePath": "/workspace-profile", "path": "/outreach/profile", "id": "updateOutreachProfile", "scope": "outreach:write", "group": "campaigns", "retry": "state" },
|
|
37
54
|
{ "method": "get", "nativePath": "/audience-sources", "path": "/outreach/audience-sources", "id": "listAudienceSources", "scope": "outreach:read", "group": "campaigns", "retry": "none" },
|
|
38
55
|
{ "method": "get", "nativePath": "/audience-contacts", "path": "/outreach/audience-contacts", "id": "listAudienceContacts", "scope": "outreach:read", "group": "campaigns", "retry": "none" },
|
|
56
|
+
{ "method": "post", "nativePath": "/audience-selection/availability", "path": "/outreach/audiences/availability", "id": "checkAudienceAvailability", "scope": "outreach:read", "group": "campaigns", "retry": "safe" },
|
|
39
57
|
{ "method": "post", "nativePath": "/audience-snapshots/preview-selection", "path": "/outreach/audiences/preview", "id": "previewAudience", "scope": "outreach:write", "group": "campaigns", "retry": "operation_id" },
|
|
40
58
|
{ "method": "post", "nativePath": "/audience-snapshots/from-selection", "path": "/outreach/audiences", "id": "createAudience", "scope": "outreach:write", "group": "campaigns", "retry": "operation_id" },
|
|
41
59
|
{ "method": "get", "nativePath": "/strategies", "path": "/outreach/campaigns", "id": "listCampaigns", "scope": "outreach:read", "group": "campaigns", "retry": "none" },
|
|
@@ -48,7 +66,9 @@ var WORKSPACE_OPERATIONS = [
|
|
|
48
66
|
{ "method": "post", "nativePath": "/strategies/:id/launch", "path": "/outreach/campaigns/:id/launch", "id": "launchCampaign", "scope": "outreach:send", "group": "campaigns", "retry": "bound" },
|
|
49
67
|
{ "method": "post", "nativePath": "/strategies/:id/pause", "path": "/outreach/campaigns/:id/pause", "id": "pauseCampaign", "scope": "outreach:write", "group": "campaigns", "retry": "state" },
|
|
50
68
|
{ "method": "post", "nativePath": "/strategies/:id/resume", "path": "/outreach/campaigns/:id/resume", "id": "resumeCampaign", "scope": "outreach:send", "group": "campaigns", "retry": "state" },
|
|
69
|
+
{ "method": "get", "nativePath": "/strategies/:id/resume-summary", "path": "/outreach/campaigns/:id/resume-summary", "id": "getCampaignResumeSummary", "scope": "outreach:read", "group": "campaigns", "retry": "none" },
|
|
51
70
|
{ "method": "get", "nativePath": "/review", "path": "/outreach/review", "id": "listReview", "scope": "outreach:read", "group": "campaigns", "retry": "none" },
|
|
71
|
+
{ "method": "get", "nativePath": "/review/summary", "path": "/outreach/review/summary", "id": "getReviewSummary", "scope": "outreach:read", "group": "campaigns", "retry": "none" },
|
|
52
72
|
{ "method": "post", "nativePath": "/review/:messageId/deny", "path": "/outreach/review/:messageId/deny", "id": "denyMessage", "scope": "outreach:write", "group": "campaigns", "retry": "bound" },
|
|
53
73
|
{ "method": "post", "nativePath": "/review/:messageId/skip", "path": "/outreach/review/:messageId/skip", "id": "skipMessage", "scope": "outreach:write", "group": "campaigns", "retry": "bound" },
|
|
54
74
|
{ "method": "get", "nativePath": "/replies", "path": "/outreach/replies", "id": "listReplies", "scope": "outreach:read", "group": "campaigns", "retry": "none" },
|
|
@@ -69,6 +89,13 @@ var WORKSPACE_OPERATIONS = [
|
|
|
69
89
|
{ "method": "post", "nativePath": "/api/recurring-requests", "path": "/recurring-requests", "id": "createRecurringRequest", "scope": "lead_engine:write", "group": "workspace", "retry": "operation_id", "additionalScopes": ["outreach:send"] },
|
|
70
90
|
{ "method": "patch", "nativePath": "/api/recurring-requests/setups/:id", "path": "/recurring-requests/setups/:id", "id": "updateRecurringSetup", "scope": "lead_engine:write", "group": "workspace", "retry": "bound", "additionalScopes": ["outreach:send"] },
|
|
71
91
|
{ "method": "patch", "nativePath": "/api/recurring-requests/:id", "path": "/recurring-requests/:id", "id": "updateRecurringRequest", "scope": "lead_engine:write", "group": "workspace", "retry": "bound", "additionalScopes": ["outreach:send"] },
|
|
92
|
+
{ "method": "get", "nativePath": "/api/assistant/schedules", "path": "/agent/schedules", "id": "listAgentSchedules", "scope": "outreach:read", "group": "workspace", "retry": "none" },
|
|
93
|
+
{ "method": "post", "nativePath": "/api/assistant/schedules", "path": "/agent/schedules", "id": "createAgentSchedule", "scope": "outreach:write", "group": "workspace", "retry": "operation_id", "additionalScopes": ["lead_engine:read", "pipeline:read", "outreach:read"] },
|
|
94
|
+
{ "method": "patch", "nativePath": "/api/assistant/schedules/:id", "path": "/agent/schedules/:id", "id": "updateAgentSchedule", "scope": "outreach:write", "group": "workspace", "retry": "state", "additionalScopes": ["lead_engine:read", "pipeline:read", "outreach:read"] },
|
|
95
|
+
{ "method": "get", "nativePath": "/api/assistant/schedules/:id/runs", "path": "/agent/schedules/:id/runs", "id": "listAgentScheduleRuns", "scope": "outreach:read", "group": "workspace", "retry": "none" },
|
|
96
|
+
{ "method": "get", "nativePath": "/api/assistant/memories", "path": "/agent/memories", "id": "listAgentMemories", "scope": "outreach:read", "group": "workspace", "retry": "none" },
|
|
97
|
+
{ "method": "post", "nativePath": "/api/assistant/memories", "path": "/agent/memories", "id": "createAgentMemory", "scope": "outreach:write", "group": "workspace", "retry": "operation_id" },
|
|
98
|
+
{ "method": "patch", "nativePath": "/api/assistant/memories/:id", "path": "/agent/memories/:id", "id": "updateAgentMemory", "scope": "outreach:write", "group": "workspace", "retry": "state" },
|
|
72
99
|
{ "method": "get", "nativePath": "/queued", "path": "/outreach/queued", "id": "listQueuedMessages", "scope": "outreach:read", "group": "campaigns", "retry": "none" },
|
|
73
100
|
{ "method": "get", "nativePath": "/queued/:messageId", "path": "/outreach/queued/:messageId", "id": "getQueuedMessage", "scope": "outreach:read", "group": "campaigns", "retry": "none" },
|
|
74
101
|
{ "method": "get", "nativePath": "/queued/:messageId/outcome", "path": "/outreach/queued/:messageId/outcome", "id": "getMessageOutcome", "scope": "outreach:read", "group": "campaigns", "retry": "none" },
|
|
@@ -104,6 +131,9 @@ var WORKSPACE_OPERATIONS = [
|
|
|
104
131
|
{ "method": "get", "nativePath": "/api/company-pipeline/deal-summaries", "path": "/pipeline/deal-summaries", "id": "getDealSummaries", "scope": "pipeline:read", "group": "workspace", "retry": "none" },
|
|
105
132
|
{ "method": "get", "nativePath": "/api/revenue-insights", "path": "/pipeline/revenue-insights", "id": "getRevenueInsights", "scope": "pipeline:read", "group": "workspace", "retry": "none" },
|
|
106
133
|
{ "method": "get", "nativePath": "/api/company-pipeline/cards/:cardId/deals", "path": "/pipeline/companies/:cardId/deals", "id": "listCompanyDeals", "scope": "pipeline:read", "group": "workspace", "retry": "none" },
|
|
134
|
+
{ "method": "get", "nativePath": "/api/company-pipeline/cards/:id/calls", "path": "/pipeline/companies/:id/calls", "id": "listCompanyCalls", "scope": "pipeline:read", "group": "workspace", "retry": "none" },
|
|
135
|
+
{ "method": "get", "nativePath": "/api/call-recordings/themes", "path": "/pipeline/call-themes", "id": "getCallThemes", "scope": "pipeline:read", "group": "workspace", "retry": "none" },
|
|
136
|
+
{ "method": "get", "nativePath": "/api/call-recordings/upcoming-meetings", "path": "/pipeline/upcoming-meetings", "id": "listUpcomingMeetings", "scope": "pipeline:read", "group": "workspace", "retry": "none" },
|
|
107
137
|
{ "method": "patch", "nativePath": "/api/company-pipeline/deals/:dealId/pin", "path": "/pipeline/deals/:dealId/pin", "id": "pinDeal", "scope": "pipeline:write", "group": "workspace", "retry": "state" },
|
|
108
138
|
{ "method": "patch", "nativePath": "/api/company-pipeline/deals/:dealId/attribution", "path": "/pipeline/deals/:dealId/attribution", "id": "updateDealAttribution", "scope": "pipeline:write", "group": "workspace", "retry": "state" },
|
|
109
139
|
{ "method": "patch", "nativePath": "/api/company-pipeline/deals/actions/bulk-stage", "path": "/pipeline/deals/actions/bulk-stage", "id": "moveDeals", "scope": "pipeline:write", "group": "workspace", "retry": "body" },
|
|
@@ -111,10 +141,16 @@ var WORKSPACE_OPERATIONS = [
|
|
|
111
141
|
{ "method": "post", "nativePath": "/api/company-pipeline/contact-engagements/:engagementId/qualification-deal/undo", "path": "/pipeline/contacts/:engagementId/qualification-deal/undo", "id": "undoContactQualification", "scope": "pipeline:write", "group": "workspace", "retry": "body" },
|
|
112
142
|
{ "method": "get", "nativePath": "/api/company-pipeline/cards/:cardId/note-counts", "path": "/pipeline/companies/:cardId/note-counts", "id": "getCompanyNoteCounts", "scope": "pipeline:read", "group": "workspace", "retry": "none" },
|
|
113
143
|
{ "method": "post", "nativePath": "/api/company-pipeline/cards/:cardId/notes/clear", "path": "/pipeline/companies/:cardId/notes/archive", "id": "archiveCompanyNotes", "scope": "pipeline:write", "group": "workspace", "retry": "state" },
|
|
144
|
+
{ "method": "get", "nativePath": "/api/company-pipeline/tasks", "path": "/pipeline/tasks", "id": "listContactTasks", "scope": "pipeline:read", "group": "workspace", "retry": "none" },
|
|
145
|
+
{ "method": "post", "nativePath": "/api/company-pipeline/contact-engagements/:engagementId/tasks", "path": "/pipeline/contacts/:engagementId/tasks", "id": "createContactTask", "scope": "pipeline:write", "group": "workspace", "retry": "header_uuid" },
|
|
146
|
+
{ "method": "patch", "nativePath": "/api/company-pipeline/tasks/:taskId", "path": "/pipeline/tasks/:taskId", "id": "updateContactTask", "scope": "pipeline:write", "group": "workspace", "retry": "state" },
|
|
114
147
|
{ "method": "post", "nativePath": "/strategies/:id/audience/preview", "path": "/outreach/campaigns/:id/audience/preview", "id": "previewCampaignAudience", "scope": "outreach:write", "group": "campaigns", "retry": "operation_id", "retryIdentity": "campaignAudience" },
|
|
115
148
|
{ "method": "post", "nativePath": "/strategies/:id/audience/add", "path": "/outreach/campaigns/:id/audience/add", "id": "addCampaignAudience", "scope": "outreach:send", "group": "campaigns", "retry": "operation_id", "retryIdentity": "campaignAudience" },
|
|
116
149
|
{ "method": "get", "nativePath": "/strategies/:id/audience/contacts", "path": "/outreach/campaigns/:id/audience/contacts", "id": "listCampaignContacts", "scope": "outreach:read", "group": "campaigns", "retry": "none" },
|
|
117
150
|
{ "method": "post", "nativePath": "/strategies/:id/audience/contacts/:enrollmentId/remove", "path": "/outreach/campaigns/:id/audience/contacts/:enrollmentId/remove", "id": "removePendingCampaignContact", "scope": "outreach:write", "group": "campaigns", "retry": "state" },
|
|
151
|
+
{ "method": "get", "nativePath": "/strategies/:id/audience/unmessaged", "path": "/outreach/campaigns/:id/audience/unmessaged", "id": "getUnmessagedCampaignContacts", "scope": "outreach:read", "group": "campaigns", "retry": "none" },
|
|
152
|
+
{ "method": "post", "nativePath": "/strategies/:id/audience/unmessaged/remove", "path": "/outreach/campaigns/:id/audience/unmessaged/remove", "id": "removeUnmessagedCampaignContacts", "scope": "outreach:write", "group": "campaigns", "retry": "state" },
|
|
153
|
+
{ "method": "post", "nativePath": "/strategies/:id/audience/unmessaged/segment", "path": "/outreach/campaigns/:id/audience/unmessaged/segment", "id": "previewCampaignAudienceSegment", "scope": "outreach:read", "group": "campaigns", "retry": "safe" },
|
|
118
154
|
{ "method": "post", "nativePath": "/conversations/:id/sequence", "path": "/outreach/conversations/:id/sequence", "id": "updateConversationSequence", "scope": "outreach:send", "group": "campaigns", "retry": "state" },
|
|
119
155
|
{ "method": "put", "nativePath": "/strategies/:id/contact-cap", "path": "/outreach/campaigns/:id/contact-cap", "id": "updateCampaignContactCap", "scope": "outreach:send", "group": "campaigns", "retry": "operation_id" },
|
|
120
156
|
{ "method": "put", "nativePath": "/strategies/:id/sender-allocations", "path": "/outreach/campaigns/:id/sender-allocations", "id": "updateSenderAllocations", "scope": "outreach:send", "group": "campaigns", "retry": "state" },
|
|
@@ -126,8 +162,13 @@ var WORKSPACE_OPERATIONS = [
|
|
|
126
162
|
{ "method": "post", "nativePath": "/review/bulk-approve", "path": "/outreach/review/bulk-approve", "id": "bulkApproveMessages", "scope": "outreach:send", "group": "campaigns", "retry": "bound" },
|
|
127
163
|
{ "method": "post", "nativePath": "/review/bulk-deny", "path": "/outreach/review/bulk-deny", "id": "bulkDenyMessages", "scope": "outreach:write", "group": "campaigns", "retry": "bound" },
|
|
128
164
|
{ "method": "post", "nativePath": "/review/bulk-skip", "path": "/outreach/review/bulk-skip", "id": "bulkSkipMessages", "scope": "outreach:write", "group": "campaigns", "retry": "bound" },
|
|
129
|
-
{ "method": "post", "nativePath": "/review/:messageId/recheck-autopilot", "path": "/outreach/review/:messageId/recheck-autopilot", "id": "recheckMessageAutopilot", "scope": "outreach:send", "group": "campaigns", "retry": "bound" }
|
|
165
|
+
{ "method": "post", "nativePath": "/review/:messageId/recheck-autopilot", "path": "/outreach/review/:messageId/recheck-autopilot", "id": "recheckMessageAutopilot", "scope": "outreach:send", "group": "campaigns", "retry": "bound" },
|
|
166
|
+
{ "method": "get", "nativePath": "/api/lead-searches", "path": "/lead-searches", "id": "listLeadSearches", "scope": "lead_engine:read", "group": "workspace", "retry": "none" },
|
|
167
|
+
{ "method": "post", "nativePath": "/api/lead-searches/:id/actions", "path": "/lead-searches/:id/actions", "id": "changeLeadSearch", "scope": "lead_engine:write", "group": "workspace", "retry": "bound" }
|
|
130
168
|
];
|
|
169
|
+
var STAFF_ONLY_OPERATION_IDS = /* @__PURE__ */ new Set(["listLeadSearches", "changeLeadSearch"]);
|
|
170
|
+
var isStaffOnlyOperation = (id) => STAFF_ONLY_OPERATION_IDS.has(id);
|
|
171
|
+
var PUBLIC_WORKSPACE_OPERATIONS = WORKSPACE_OPERATIONS.filter((operation) => !isStaffOnlyOperation(operation.id));
|
|
131
172
|
var bodyScopeRules = (operation) => Object.entries(operation.bodyScopes ?? {});
|
|
132
173
|
var requiredScopes = (operation, body) => [
|
|
133
174
|
operation.scope,
|
|
@@ -143,6 +184,7 @@ var LEGACY_API_OPERATIONS = [
|
|
|
143
184
|
{ method: "get", path: "/reference/cities", id: "listCities", scope: "", retry: "none" },
|
|
144
185
|
{ method: "get", path: "/reference/company-sizes", id: "listCompanySizes", scope: "", retry: "none" },
|
|
145
186
|
{ method: "get", path: "/reference/lead-types", id: "listLeadTypes", scope: "", retry: "none" },
|
|
187
|
+
{ method: "get", path: "/playbook", id: "getPlaybook", scope: "", retry: "none" },
|
|
146
188
|
{ method: "get", path: "/lead-requests", id: "listLeadRequests", scope: "lead_requests:read", retry: "none" },
|
|
147
189
|
{ method: "post", path: "/lead-requests", id: "createLeadRequest", scope: "lead_requests:write", additionalScopes: ["leads:read"], retry: "header" },
|
|
148
190
|
{ method: "get", path: "/lead-requests/:id", id: "getLeadRequest", scope: "lead_requests:read", retry: "none" },
|
|
@@ -165,7 +207,8 @@ var LeadpoetError = class extends Error {
|
|
|
165
207
|
};
|
|
166
208
|
var object = (value) => Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
167
209
|
var keyRequired = (retry) => ["header", "header_uuid", "operation_id", "request_id", "body"].includes(retry);
|
|
168
|
-
var
|
|
210
|
+
var allOperations = CLIENT_OPERATIONS.map(({ nativePath: _native, group: _group, ...operation }) => operation);
|
|
211
|
+
var operations = allOperations.filter((operation) => !isStaffOnlyOperation(operation.id));
|
|
169
212
|
var LeadpoetClient = class {
|
|
170
213
|
#apiKey;
|
|
171
214
|
constructor(options) {
|
|
@@ -240,6 +283,7 @@ var LeadpoetClient = class {
|
|
|
240
283
|
if (!["pending", "processing"].includes(result.data.status)) {
|
|
241
284
|
throw new LeadpoetError("Invalid request status response", 502, "invalid_response", result.request_id);
|
|
242
285
|
}
|
|
286
|
+
if (object(result.data.progress) && result.data.progress.state === "archived") return result;
|
|
243
287
|
await new Promise((resolve, reject) => {
|
|
244
288
|
const onAbort = () => {
|
|
245
289
|
clearTimeout(timer);
|
|
@@ -304,6 +348,7 @@ var LeadpoetClient = class {
|
|
|
304
348
|
export {
|
|
305
349
|
LeadpoetClient,
|
|
306
350
|
LeadpoetError,
|
|
351
|
+
allOperations,
|
|
307
352
|
operations
|
|
308
353
|
};
|
|
309
354
|
//# sourceMappingURL=client.js.map
|