@sellable/mcp 0.1.527 → 0.1.528
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/tools/leads.js +11 -2
- package/package.json +1 -1
package/dist/tools/leads.js
CHANGED
|
@@ -1316,6 +1316,14 @@ function normalizeImportProvider(provider) {
|
|
|
1316
1316
|
return "signal-discovery";
|
|
1317
1317
|
return undefined;
|
|
1318
1318
|
}
|
|
1319
|
+
function inferImportProviderFromLeadListConfig(config) {
|
|
1320
|
+
const provider = normalizeImportProvider(config?.importProvider);
|
|
1321
|
+
if (provider)
|
|
1322
|
+
return provider;
|
|
1323
|
+
if (config?.type === "signal_lead_list")
|
|
1324
|
+
return "signal-discovery";
|
|
1325
|
+
return undefined;
|
|
1326
|
+
}
|
|
1319
1327
|
function assertPhase126ImportProvider(provider, campaignOfferId) {
|
|
1320
1328
|
if (!provider) {
|
|
1321
1329
|
throw new Error(`import_leads requires a supported leadSourceProvider for campaign ${campaignOfferId}. Provide provider or set campaign.leadSourceProvider to sales-nav, prospeo, or signal-discovery, then call get_provider_prompt({ provider, campaignOfferId }).`);
|
|
@@ -4202,7 +4210,8 @@ export async function confirmLeadList(input) {
|
|
|
4202
4210
|
});
|
|
4203
4211
|
let resolvedLeadListId = sourceLeadListId;
|
|
4204
4212
|
let resolvedProvider;
|
|
4205
|
-
|
|
4213
|
+
const isSameSourceRefillCopy = currentStep === null && Array.isArray(sourceRowIds) && sourceRowIds.length > 0;
|
|
4214
|
+
if (!resolvedLeadListId || currentStep === undefined || !isSameSourceRefillCopy) {
|
|
4206
4215
|
const campaign = requestOptions
|
|
4207
4216
|
? await api.get(`/api/v2/campaign-offers/${campaignOfferId}`, requestOptions)
|
|
4208
4217
|
: await api.get(`/api/v2/campaign-offers/${campaignOfferId}`);
|
|
@@ -4258,7 +4267,7 @@ export async function confirmLeadList(input) {
|
|
|
4258
4267
|
: await api.get(`/api/v3/workflow-tables/${resolvedLeadListId}?mode=meta`);
|
|
4259
4268
|
const leadListConfig = leadListMeta.table?.config ?? null;
|
|
4260
4269
|
if (!resolvedProvider) {
|
|
4261
|
-
resolvedProvider =
|
|
4270
|
+
resolvedProvider = inferImportProviderFromLeadListConfig(leadListConfig);
|
|
4262
4271
|
}
|
|
4263
4272
|
const leadListRowCount = leadListMeta.rowCount ?? 0;
|
|
4264
4273
|
const importProgress = leadListConfig?.importProgress ?? null;
|