@sellable/mcp 0.1.373 → 0.1.374
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/server.js +7 -1
- package/dist/tools/campaigns.d.ts +7 -0
- package/dist/tools/campaigns.js +19 -0
- package/package.json +1 -1
package/dist/server.js
CHANGED
|
@@ -11,7 +11,7 @@ import { fillCampaignHorizon } from "./tools/campaign-horizon-fill.js";
|
|
|
11
11
|
import { cancelPrepareCampaignMessages, getPrepareCampaignMessagesStatus, startPrepareCampaignMessages, } from "./tools/campaign-message-preparation.js";
|
|
12
12
|
import { getCampaignRefillState } from "./tools/campaign-refill-state.js";
|
|
13
13
|
import { getCampaignTableSchema, queueCampaignCells, recordCampaignReviewBatch, reviseMessageTemplateAndRerun, selectCampaignCells, waitForCampaignProcessing, } from "./tools/campaign-processing.js";
|
|
14
|
-
import { createCampaign, duplicateCampaign, getCampaign, getCampaignMessagesPreview, getCampaigns, pauseCampaign, startCampaign, updateCampaign, updateCampaignBrief, } from "./tools/campaigns.js";
|
|
14
|
+
import { archiveCampaign, createCampaign, duplicateCampaign, getCampaign, getCampaignMessagesPreview, getCampaigns, pauseCampaign, startCampaign, updateCampaign, updateCampaignBrief, } from "./tools/campaigns.js";
|
|
15
15
|
import { queueCells, updateCell } from "./tools/cells.js";
|
|
16
16
|
import { handleStartCliLogin, handleWaitForCliLogin, } from "./tools/cli-login.js";
|
|
17
17
|
import { handleDeleteColumn } from "./tools/column-delete.js";
|
|
@@ -298,6 +298,12 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
298
298
|
case "pause_campaign":
|
|
299
299
|
result = await pauseCampaign(args?.campaignId);
|
|
300
300
|
break;
|
|
301
|
+
case "archive_campaign":
|
|
302
|
+
result = await archiveCampaign(args?.campaignId);
|
|
303
|
+
if (args?.campaignId && result?.success) {
|
|
304
|
+
markCampaignContextDirty(args.campaignId, "archive_campaign");
|
|
305
|
+
}
|
|
306
|
+
break;
|
|
301
307
|
case "duplicate_campaign":
|
|
302
308
|
result = await duplicateCampaign(args?.campaignId);
|
|
303
309
|
if (result?.campaignOfferId) {
|
|
@@ -827,6 +827,13 @@ export declare function startCampaign(campaignId: string): Promise<{
|
|
|
827
827
|
export declare function pauseCampaign(campaignId: string): Promise<{
|
|
828
828
|
success: boolean;
|
|
829
829
|
}>;
|
|
830
|
+
export declare function archiveCampaign(campaignId: string): Promise<{
|
|
831
|
+
success: boolean;
|
|
832
|
+
campaignStatus: string;
|
|
833
|
+
archivedAlready?: boolean;
|
|
834
|
+
cellsReset?: number;
|
|
835
|
+
workflowTableId?: string;
|
|
836
|
+
}>;
|
|
830
837
|
export declare function duplicateCampaign(campaignId: string): Promise<{
|
|
831
838
|
campaignOfferId: string;
|
|
832
839
|
campaignName: string;
|
package/dist/tools/campaigns.js
CHANGED
|
@@ -177,6 +177,21 @@ function assertBriefHandoffWatchUrl(watchUrl, campaignId) {
|
|
|
177
177
|
"with create_campaign({ campaignId }) or get_campaign before asking for approval.");
|
|
178
178
|
}
|
|
179
179
|
export const campaignToolDefinitions = [
|
|
180
|
+
{
|
|
181
|
+
name: "archive_campaign",
|
|
182
|
+
description: "Archive a campaign through Sellable's product archive endpoint. This is an explicit cleanup/archive action, is idempotent, and may unschedule pending cells owned by that campaign table. Do not use from refill/setup commands unless the user explicitly asked to archive exact campaign ids.",
|
|
183
|
+
inputSchema: {
|
|
184
|
+
type: "object",
|
|
185
|
+
properties: {
|
|
186
|
+
campaignId: {
|
|
187
|
+
type: "string",
|
|
188
|
+
description: "Exact CampaignOffer id to archive.",
|
|
189
|
+
},
|
|
190
|
+
},
|
|
191
|
+
required: ["campaignId"],
|
|
192
|
+
additionalProperties: false,
|
|
193
|
+
},
|
|
194
|
+
},
|
|
180
195
|
{
|
|
181
196
|
name: "duplicate_campaign",
|
|
182
197
|
description: "Duplicate a campaign by calling Sellable's existing duplicate endpoint. Returns campaignOfferId, campaignName, and workflowTableId for the new copy.",
|
|
@@ -1007,6 +1022,10 @@ export async function pauseCampaign(campaignId) {
|
|
|
1007
1022
|
const api = getApi();
|
|
1008
1023
|
return api.post(`/api/v3/campaigns/${campaignId}/pause`);
|
|
1009
1024
|
}
|
|
1025
|
+
export async function archiveCampaign(campaignId) {
|
|
1026
|
+
const api = getApi();
|
|
1027
|
+
return api.post(`/api/v3/campaigns/${campaignId}/archive`);
|
|
1028
|
+
}
|
|
1010
1029
|
export async function duplicateCampaign(campaignId) {
|
|
1011
1030
|
const api = getApi();
|
|
1012
1031
|
return api.post(`/api/v3/campaigns/${campaignId}/duplicate`);
|